Skip to content

Commit 175af14

Browse files
committed
fix suggestions
1 parent e4eb26b commit 175af14

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

lib/internal/test_runner/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function tryBuiltinReporter(name) {
132132
function colorizeTestFiles(rootTest) {
133133
const { reporters, destinations } = parseCommandLine();
134134
ArrayPrototypeForEach(reporters, (_, index) => {
135-
const destination = kBuiltinDestinations.get(destinations[index]) ?? createWriteStream(destinations[index]);
135+
const destination = kBuiltinDestinations.get(destinations[index]);
136136
rootTest.harness.shouldColorizeTestFiles ||= shouldColorize(destination);
137137
});
138138
}

test/parallel/test-runner-run.mjs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
// Flags: --expose-internals
2-
31
import * as common from '../common/index.mjs';
42
import * as fixtures from '../common/fixtures.mjs';
53
import { join } from 'node:path';
64
import { describe, it, run } from 'node:test';
75
import { dot, spec, tap } from 'node:test/reporters';
86
import assert from 'node:assert';
9-
import stream from 'internal/test_runner/tests_stream';
107

11-
const { TestsStream } = stream;
128
const testFixtures = fixtures.path('test-runner');
139

1410
describe('require(\'node:test\').run', { concurrency: true }, () => {
@@ -474,7 +470,7 @@ describe('require(\'node:test\').run', { concurrency: true }, () => {
474470
const stream = run({
475471
files: [join(testFixtures, 'default-behavior/test/random.cjs')],
476472
setup: common.mustCall((root) => {
477-
assert(root instanceof TestsStream);
473+
assert.strictEqual(root.constructor.name, "TestsStream");
478474
}),
479475
});
480476
stream.on('test:fail', common.mustNotCall());

0 commit comments

Comments
 (0)