tapjs / tap-mocha-reporter

Format a TAP stream using Mocha's set of reporters

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compatibility with Node.js native TAP output

guybedford opened this issue · comments

It would be amazing to have a good reporter that has high compatibility with Node.js native TAP output via the new Node.js test core module.

This package gets the closest I've found so far, but with a couple of limitations:

  • Error stacks do not get displayed when piping the tap stream.
  • Skipped tests are not picked up
  • Test "TODO"s are not picked up

I understand node-tap is the target, but I can't seem to find an alternative, and it would be great to have a high quality formatter for these use cases.

commented

The fact that errors are not displayed is a real issue tho, hard to debug without them

100% agree. Have been playing around with node:test's tap output with many reporters, and this is by far the one with the best support, but the lack of any diagnostics or error stacks just make it unusable. Additionally, pure TAP output is hard to read, so I think I will have to use node-tap for now instead of node:test purely because of reporter support

I fixed error stacks in this PR.
Until it merged you can use tap-mocha-reporter from the fork:

npm i -D vitalets/tap-mocha-reporter