Skip to content

Commit d2ec961

Browse files
Giovanni Buccitargos
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 747d9ae commit d2ec961

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎test/parallel/test-runner-run.mjs‎

Lines changed: 5 additions & 4 deletions
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
importassertfrom'node:assert';
7+
importutilfrom'node:util';
78

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

@@ -76,10 +77,10 @@ describe('require(\'node:test\').run', { concurrency: true }, () => {
7677
constresult=awaitrun({
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)