Directives not matched correctly
Closed this issue · 0 comments
Munter commented
I have a case there my test name contains an #
, which tap-parser parses as if the directive starts at this first #
. I have a case where that logic fails because my directive comes later.
Example:
ok 8050 index.html --> code.html#line12 # SKIP
The TAP specification only ever mentions SKIP
and TODO
directives as having this exact syntax # SKIP
or # TODO
, so a #
followed by a space, followed by the directive.
tap-parser doesn't match the directive name in that exact way. In https://github.com/tapjs/tap-parser/blob/master/index.js#L72 my example ends up as 'line12 # SKIP'
in the rest
variable, which then gets sent into directive detection. But the directive detection only looks for skip
and todo
at the very start of the string and thus never detects my directive