mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
test: strip color chars in test-runner-run
Fixes: https://github.com/nodejs/node/issues/54551 PR-URL: https://github.com/nodejs/node/pull/54552 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
parent
f5f67ae4a7
commit
92ca0b7ec1
@ -4,6 +4,7 @@ import { join } from 'node:path';
|
||||
import { describe, it, run } from 'node:test';
|
||||
import { dot, spec, tap } from 'node:test/reporters';
|
||||
import assert from 'node:assert';
|
||||
import util from 'node:util';
|
||||
|
||||
const testFixtures = fixtures.path('test-runner');
|
||||
|
||||
@ -68,10 +69,10 @@ describe('require(\'node:test\').run', { concurrency: true }, () => {
|
||||
const result = await run({
|
||||
files: [join(testFixtures, 'default-behavior/test/random.cjs')]
|
||||
}).compose(dot).toArray();
|
||||
assert.deepStrictEqual(result, [
|
||||
'.',
|
||||
'\n',
|
||||
]);
|
||||
|
||||
assert.strictEqual(result.length, 2);
|
||||
assert.strictEqual(util.stripVTControlCharacters(result[0]), '.');
|
||||
assert.strictEqual(result[1], '\n');
|
||||
});
|
||||
|
||||
describe('should be piped with spec reporter', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user