Skip to content

Commit ee385d6

Browse files
puskin94RafaelGSS
authored andcommitted
test: strip color chars in test-runner-run
Fixes: #54551 PR-URL: #54552 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent 3396a49 commit ee385d6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/parallel/test-runner-run.mjs

+5-4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { join } from 'node:path';
44
import { describe, it, run } from 'node:test';
55
import { dot, spec, tap } from 'node:test/reporters';
66
import assert from 'node:assert';
7+
import util from 'node:util';
78

89
const testFixtures = fixtures.path('test-runner');
910

@@ -68,10 +69,10 @@ describe('require(\'node:test\').run', { concurrency: true }, () => {
6869
const result = await run({
6970
files: [join(testFixtures, 'default-behavior/test/random.cjs')]
7071
}).compose(dot).toArray();
71-
assert.deepStrictEqual(result, [
72-
'.',
73-
'\n',
74-
]);
72+
73+
assert.strictEqual(result.length, 2);
74+
assert.strictEqual(util.stripVTControlCharacters(result[0]), '.');
75+
assert.strictEqual(result[1], '\n');
7576
});
7677

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

0 commit comments

Comments
 (0)