-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
Expand file tree
/
Copy pathtest-node-output-console.mjs
More file actions
29 lines (27 loc) · 1.01 KB
/
test-node-output-console.mjs
File metadata and controls
29 lines (27 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import '../common/index.mjs';
import * as fixtures from '../common/fixtures.mjs';
import * as snapshot from '../common/assertSnapshot.js';
import { describe, it } from 'node:test';
const skipForceColors =
process.config.variables.icu_gyp_path !== 'tools/icu/icu-generic.gyp' ||
process.config.variables.node_shared_openssl;
describe('console output', { concurrency: !process.env.TEST_PARALLEL }, () => {
const tests = [
{ name: 'console/console_assert.js' },
{ name: 'console/2100bytes.js' },
{ name: 'console/console_low_stack_space.js' },
{ name: 'console/console.js' },
{ name: 'console/hello_world.js' },
{ name: 'console/stack_overflow.js' },
!skipForceColors ? { name: 'console/force_colors.js', env: { FORCE_COLOR: 1 } } : null,
].filter(Boolean);
for (const { name, env } of tests) {
it(name, async () => {
await snapshot.spawnAndAssert(
fixtures.path(name),
snapshot.defaultTransform,
{ env: { ...env, ...process.env } },
);
});
}
});