juliangruber / tap-bail

Bail out when the first TAP test fails
17 stars 4 forks source link

Suggestion for v1.0.0 - total refactor, also adds programmatic api #3

Open m59peacemaker opened 8 years ago

m59peacemaker commented 8 years ago

These changes add a transform stream version for programmatic usage and better testing. I can publish my own package if you would rather, but it is ideal to me to make tap-bail the best it can be. Let me know what you think.

m59peacemaker commented 8 years ago

Yeah, the syntax could be a problem. I think tap-parser is deficient in that it doesn't pass the original value through, so it's not very convenient in this case. Off the top of my head, in order to transform TAP programmatically and be able to pass through the orginal value with tap-parser, you'd either have to write something to unparse it or do something hacky and ugly. So, then the problem is that all my tap tools are written to support Node 6. I figured if they were of value to anyone that needed older support, they could PR a babel setup. Anyway, maybe this could be on hold until Node 4 isn't common. I'll publish @m59/tap-bail for my purposes.

On Oct 7, 2016 10:59 AM, "Julian Gruber" notifications@github.com wrote:

@juliangruber requested changes on this pull request.

in general i like the idea of exposing a through stream, but this change

is too big, this is basically a new module.

In index.js https://github.com/juliangruber/tap-bail/pull/3#pullrequestreview-3329037 :

@@ -0,0 +1,19 @@ +const parser = require('tap_parser')

why did tap-parser not work?

In index.js https://github.com/juliangruber/tap-bail/pull/3#pullrequestreview-3329037 :

@@ -0,0 +1,19 @@ +const parser = require('tap_parser') +const duplex = require('duplexer') +const {obj: through} = require('throo')

this is too new syntax, it should work with node v4 at least. also, i'd prefer to just use through2, it's a very common dependency.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/juliangruber/tap-bail/pull/3#pullrequestreview-3329037, or mute the thread https://github.com/notifications/unsubscribe-auth/AEKrX2ehpgEUYf6e78meA0mOBS6NKTR1ks5qxmxFgaJpZM4KNAuA .