Skip to content

Commit

Permalink
fix suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
pulkit-30 committed Dec 12, 2023
1 parent e4eb26b commit 175af14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/internal/test_runner/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function tryBuiltinReporter(name) {
function colorizeTestFiles(rootTest) {
const { reporters, destinations } = parseCommandLine();
ArrayPrototypeForEach(reporters, (_, index) => {
const destination = kBuiltinDestinations.get(destinations[index]) ?? createWriteStream(destinations[index]);
const destination = kBuiltinDestinations.get(destinations[index]);
rootTest.harness.shouldColorizeTestFiles ||= shouldColorize(destination);
});
}
Expand Down
6 changes: 1 addition & 5 deletions test/parallel/test-runner-run.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
// Flags: --expose-internals

import * as common from '../common/index.mjs';
import * as fixtures from '../common/fixtures.mjs';
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 stream from 'internal/test_runner/tests_stream';

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

describe('require(\'node:test\').run', { concurrency: true }, () => {
Expand Down Expand Up @@ -474,7 +470,7 @@ describe('require(\'node:test\').run', { concurrency: true }, () => {
const stream = run({
files: [join(testFixtures, 'default-behavior/test/random.cjs')],
setup: common.mustCall((root) => {
assert(root instanceof TestsStream);
assert.strictEqual(root.constructor.name, "TestsStream");

Check failure on line 473 in test/parallel/test-runner-run.mjs

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Strings must use singlequote
}),
});
stream.on('test:fail', common.mustNotCall());
Expand Down

0 comments on commit 175af14

Please sign in to comment.