Skip to content

Commit 35ffd20

Browse files
islandryuaduh95
authored andcommitted
test: enable skipped colorize test
PR-URL: #57887 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
1 parent 41468be commit 35ffd20

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

test/fixtures/test-runner/output/coverage-width-80-color.snapshot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
ℹ output | [31m [34m | [31m [34m | [31m [34m |
2121
ℹ [32mcoverage-width-80-color.mjs [34m | [32m100.00[34m | [32m 100.00[34m | [32m 100.00[34m |
2222
ℹ ------------------------------------------------------------------------------
23-
ℹ all files | [33m 61.33[34m | [32m 100.00[34m | [31m 0.00[34m |
23+
ℹ all files | [33m 62.34[34m | [32m 100.00[34m | [31m 0.00[34m |
2424
ℹ ------------------------------------------------------------------------------
2525
ℹ end of coverage report
2626
[39m

test/fixtures/test-runner/output/coverage-width-80-uncovered-lines-color.snapshot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
ℹ output | [31m [34m | [31m [34m | [31m [34m |
2222
ℹ [32mcoverage-width-80-uncovered-lines-color.mjs [34m | [32m100.00[34m | [32m 100.00[34m | [32m 100.00[34m |
2323
ℹ --------------------------------------------------------------------------------------------------
24-
ℹ all files | [33m 52.91[34m | [33m 60.00[34m | [31m 1.61[34m |
24+
ℹ all files | [33m 53.24[34m | [33m 60.00[34m | [31m 1.61[34m |
2525
ℹ --------------------------------------------------------------------------------------------------
2626
ℹ end of coverage report
2727
[39m

test/parallel/test-runner-output.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1+
// Flags: --expose-internals
12
import * as common from '../common/index.mjs';
23
import * as fixtures from '../common/fixtures.mjs';
34
import * as snapshot from '../common/assertSnapshot.js';
45
import { describe, it } from 'node:test';
56
import { hostname } from 'node:os';
67
import { chdir, cwd } from 'node:process';
78
import { fileURLToPath } from 'node:url';
9+
import internalTTy from 'internal/tty';
810

911
const skipForceColors =
1012
process.config.variables.icu_gyp_path !== 'tools/icu/icu-generic.gyp' ||
1113
process.config.variables.node_shared_openssl;
1214

13-
const canColorize = process.stderr?.isTTY && (
14-
typeof process.stderr?.getColorDepth === 'function' ?
15-
process.stderr?.getColorDepth() > 2 : true);
15+
const canColorize = internalTTy.getColorDepth() > 2;
1616
const skipCoverageColors = !canColorize;
1717

1818
function replaceTestDuration(str) {

0 commit comments

Comments
 (0)