Skip to content

Commit 09dd583

Browse files
committed
test: strip color chars in test-runner-run
Fixes: #54551
1 parent 1399d4e commit 09dd583

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/parallel/test-runner-run.mjs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
// Flags: --expose-internals
2+
13
import * as common from '../common/index.mjs';
24
import * as fixtures from '../common/fixtures.mjs';
35
import { join } from 'node:path';
46
import { describe, it, run } from 'node:test';
57
import { dot, spec, tap } from 'node:test/reporters';
68
import assert from 'node:assert';
9+
import utils from 'internal/util/inspect';
710

811
const testFixtures = fixtures.path('test-runner');
912

@@ -68,10 +71,9 @@ describe('require(\'node:test\').run', { concurrency: true }, () => {
6871
const result = await run({
6972
files: [join(testFixtures, 'default-behavior/test/random.cjs')]
7073
}).compose(dot).toArray();
71-
assert.deepStrictEqual(result, [
72-
'.',
73-
'\n',
74-
]);
74+
75+
assert.strictEqual(utils.stripVTControlCharacters(result[0]), '.');
76+
assert.strictEqual(utils.stripVTControlCharacters(result[1]), '\n');
7577
});
7678

7779
describe('should be piped with spec reporter', () => {

0 commit comments

Comments
 (0)