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

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy