Skip to content

Commit e7493f9

Browse files
committed
output the filename as failing and not the root
1 parent 4ccd464 commit e7493f9

4 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/internal/test_runner/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ class Test extends AsyncResource {
656656
this.parent.processPendingSubtests();
657657
} else if (!this.reported) {
658658
if (!this.passed && failed === 0 && this.error) {
659-
this.reporter.fail(this.nesting, kFilename, this.testNumber, this.name, {
659+
this.reporter.fail(0, kFilename, NaN, kFilename, {
660660
__proto__: null,
661661
duration_ms: this.#duration(),
662662
error: this.error,

test/fixtures/test-runner/output/global-after-should-fail-the-test.js renamed to test/fixtures/test-runner/output/global_after_should_fail_the_test.js

File renamed without changes.

test/fixtures/test-runner/output/global-after-should-fail-the-test.snapshot renamed to test/fixtures/test-runner/output/global_after_should_fail_the_test.snapshot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ok 1 - this is a test
55
---
66
duration_ms: *
77
...
8-
not ok 0 - <root>
8+
not ok NaN - /Users/rluvaton/dev/open-source/node/node-fork/test/fixtures/test-runner/output/global_after_should_fail_the_test.js
99
---
1010
duration_ms: *
1111
failureType: 'hookFailed'

test/parallel/test-runner-output.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const tests = [
3737
{ name: 'test-runner/output/describe_nested.js' },
3838
{ name: 'test-runner/output/hooks.js' },
3939
{ name: 'test-runner/output/hooks-with-no-global-test.js' },
40-
{ name: 'test-runner/output/global-after-should-fail-the-test.js' },
40+
{ name: 'test-runner/output/global_after_should_fail_the_test.js' },
4141
{ name: 'test-runner/output/no_refs.js' },
4242
{ name: 'test-runner/output/no_tests.js' },
4343
{ name: 'test-runner/output/only_tests.js' },

0 commit comments

Comments
 (0)