Skip to content

Commit 28efd7b

Browse files
committed
test: fix tap parser fails if a test logs a number
1 parent a03529d commit 28efd7b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/internal/test_runner/tap_parser.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,15 @@ class TapParser extends Transform {
647647
if (planEnd?.kind !== TokenKind.NUMERIC) {
648648
this.#error('Expected a plan end count');
649649
}
650-
650+
if (!planEnd) {
651+
const node = {
652+
kind: TokenKind.UNKNOWN,
653+
node: {
654+
value: this.#currentChunkAsString,
655+
},
656+
};
657+
return node;
658+
}
651659
const plan = {
652660
start: planStart.value,
653661
end: planEnd.value,

0 commit comments

Comments
 (0)