scottcorgan / tap-out

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

Cannot read property 'replace' of undefined #24

Open unional opened 8 years ago

unional commented 8 years ago

I'm running test through tape-run and got this:

  return str.replace(/^\s*|\s*$/g, '');
            ^

TypeError: Cannot read property 'replace' of undefined
    at trim (E:\myproject\node_modules\trim\index.js:5:13)
    at Parser._handleError (E:\myproject\node_modules\tap-out\index.js:184:14)
    at Parser.handleLine (E:\myproject\node_modules\tap-out\index.js:46:8)
    at Stream.<anonymous> (E:\myproject\node_modules\tap-out\index.js:212:14)
...

It comes from https://github.com/scottcorgan/tap-out/blob/master/index.js#L184 and seems like it didn't consider when line does not have ":" separator https://github.com/scottcorgan/tap-out/blob/master/index.js#L137

Thanks.