tapjs/tap-parser

Support of Streams2 and/or Streams3

Closed this issue · 4 comments

Hi

I am a happy user of tap-parser but recently I tried to use duplexer2 to combine the parser with a readable stream, using it from a script, and then it doesn't call the 'complete' event once the tests are done.
I suspect it is because the "old" stream is used:

var Writable = require('stream').Writable

Is there a way to either use latest streams version with backwards comparability? or perhaps make the parser stream agnostic, by expecting to be given a writable stream object? or at least make it possible to give another writable stream object which will be used instead?

bump. (: @Tokimon what did you end up using?

I don't really understand the request here. The parser itself is a Writable stream. You can pipe pretty much any Readable stream into it. The complete event comes after parser.end() is called.

That is, it supports Streams2 and Streams3 from Node.js core, or anything compatible with core streams.

This question derived from a misunderstanding on how to use the stream in this context. I ended up using child_process.spawn() to bind the stream together and get the correct output. I just tried to do everything 'in-code', which didn't really work. So this is not really any issue anymore.