Skip to content

Commit

Permalink
test: fix tap parser fails if a test logs a number
Browse files Browse the repository at this point in the history
  • Loading branch information
pulkit-30 committed Jan 2, 2023
1 parent a03529d commit 28efd7b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/internal/test_runner/tap_parser.js
Expand Up @@ -647,7 +647,15 @@ class TapParser extends Transform {
if (planEnd?.kind !== TokenKind.NUMERIC) {
this.#error('Expected a plan end count');
}

if (!planEnd) {
const node = {
kind: TokenKind.UNKNOWN,
node: {
value: this.#currentChunkAsString,
},
};
return node;
}
const plan = {
start: planStart.value,
end: planEnd.value,
Expand Down

0 comments on commit 28efd7b

Please sign in to comment.