scottcorgan / tap-out

A different tap parser
MIT License
23 stars 28 forks source link

tighten up result line regex to avoid misclassification #35

Open trescube opened 4 years ago

trescube commented 4 years ago

This PR strictly limits the result regexp to only those output by tape according to the specification (# tests, # pass, # fail, and # todo). The case it fixes is the mis-classification of test names that start with a word followed by a number, eg:

test('version 3.x should do this thing', spec => {})

In the above case, tape outputs # version 3.x should do this thing, however tap-out treats this as a result instead of a test due to a fairly lax regexp, causing the test name to not be output.

A test replicating the behavior is included.

spencermountain commented 3 years ago

hey @trescube I've included this PR in a fork over here. Thank you!