Skip to content

Commit d2ec961

Browse files
puskin94targos
authored andcommittedOct 2, 2024
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 747d9ae commit d2ec961

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

@@ -76,10 +77,10 @@ describe('require(\'node:test\').run', { concurrency: true }, () => {
7677
const result = await run({
7778
files: [join(testFixtures, 'default-behavior/test/random.cjs')]
7879
}).compose(dot).toArray();
79-
assert.deepStrictEqual(result, [
80-
'.',
81-
'\n',
82-
]);
80+
81+
assert.strictEqual(result.length, 2);
82+
assert.strictEqual(util.stripVTControlCharacters(result[0]), '.');
83+
assert.strictEqual(result[1], '\n');
8384
});
8485

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

0 commit comments

Comments
 (0)
Please sign in to comment.