Skip to content

Commit ffdc923

Browse files
committed
apply review suggestions
1 parent 3a2b935 commit ffdc923

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

lib/internal/test_runner/runner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ function run(options = kEmptyObject) {
851851
);
852852
if (topLevelTestCount === root.subtests.length) {
853853
// This file had no tests in it. Add the placeholder test.
854-
const subtest = root.createSubtest(Test, testFile, { __proto__: null }, undefined, {
854+
const subtest = root.createSubtest(Test, testFile, kEmptyObject, undefined, {
855855
__proto__: null,
856856
loc: [1, 1, resolve(testFile)],
857857
});

test/fixtures/test-runner/syntax-error-test.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ test('a test!', () => {
44
if true {
55
// syntax error
66
}
7-
});
7+
});

test/parallel/test-runner-enqueue-file-syntax-error.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ const child = spawnSync(process.execPath, [
1313
testFile,
1414
], { encoding: 'utf8' });
1515

16-
assert.match(child.stdout, new RegExp(`# Subtest: ${testFile}`));
17-
assert.match(child.stdout, /location:.*syntax-error-test\.mjs/);
16+
assert.match(child.stdout, /error:.*"Unexpected token 'true'"\n/);
1817
assert.match(child.stdout, /SyntaxError/);
1918
assert.strictEqual(child.status, 1);

0 commit comments

Comments
 (0)