avajs / ava

Node.js test runner that lets you develop with confidence 🚀
MIT License
20.74k stars 1.41k forks source link

Simultaneously output TAP to a file and the regular reporter to the console #3342

Open dmurvihill opened 2 months ago

dmurvihill commented 2 months ago

I want to spit out a TAP so that I can get machine-generated reports and stuff, but AVA's built-in reporter is way more human-readable than any of the existing TAP parsers (also, TAP seems to be nearly a dead format with most parsers having no changes in the last 8 years). I'd love to have a flag --tap ava-results.tap which would tee the results in TAP format while still emitting from the default reporter. The current behavior of --tap without any flag could still replace the default reporter, as could --tap -.

novemberborn commented 1 month ago

I'd love to expose AVA's richer internal data and have separate reporters that can be piped into, but that's unlikely to get done any time soon.

Even with that approach, teeing the richer data to a file would still be useful, so I'm not opposed to establishing that feature with the current TAP reporter.

Hopefully the internals allow for two simultaneous reporters to be active!

dmurvihill commented 1 month ago

I'd love to expose AVA's richer internal data and have separate reporters that can be piped into, but that's unlikely to get done any time soon.

Might I suggest (and I know this is a bunch of extra work) trying to get together with a couple of other test runner maintainers to come up with a standard format