Skip to content

Commit 9b00ad0

Browse files
committed
dont use NaN
1 parent 1f1d257 commit 9b00ad0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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(0, kFilename, NaN, kFilename, {
659+
this.reporter.fail(0, kFilename, this.subtests.length + 1, kFilename, {
660660
__proto__: null,
661661
duration_ms: this.#duration(),
662662
error: this.error,

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 NaN - /Users/rluvaton/dev/open-source/node/node-fork/test/fixtures/test-runner/output/global_after_should_fail_the_test.js
8+
not ok 2 - /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'

0 commit comments

Comments
 (0)