axross/tap-notify

Do not wait for end of stream

Opened this issue · 2 comments

I didn't check the code but I guess you wait for end of input stream before sending notifications, which means this is useless with --watch option of any test-runner like ava or mocha.

Do you think there would be a way to notify ASAP? Maybe when you have not received any chunk from some given (configurable) time? This way we could run ava | tap-notify --timeout=2000 or something like that and let it run in the background :)

@naholyr just noticed in AVA documentation: "Please note that the TAP reporter is unavailable when using watch mode." https://github.com/sindresorhus/ava#optional-tap-output

Could this be root cause for the issue (I noticed the behaviour with AVA)?

Yes this is exactly the cause ;)
I tried to dig the issue but I'm not sure if you can really do something at your level, I feel like tap-parser is guilty here, as it won't emit the final event even if he received all data specified by the tap format.