Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Bailout event emitted before the assert just before #25

Closed
anko opened this issue Aug 9, 2015 · 2 comments
Closed

Bailout event emitted before the assert just before #25

anko opened this issue Aug 9, 2015 · 2 comments

Comments

@anko
Copy link

anko commented Aug 9, 2015

#18-related?

SSCCE:

index.js (marked executable):

#!/usr/bin/env node
var t = require("tap-parser")();
t.on("assert",  function() { console.log("ASSERT" ); });
t.on("bailout", function() { console.log("BAILOUT"); });

process.stdin.pipe(t);

Run it with input:

$ ./index.js <<_
ok
ok
bail out!
_

Expected output:

ASSERT
ASSERT
BAILOUT

Actual output:

ASSERT
BAILOUT
ASSERT
@anko anko changed the title Bailout event emitted before the following assert Bailout event emitted before the assert just before Aug 9, 2015
@jamestalmage
Copy link
Member

I agree, this is weird behavior.

jamestalmage added a commit to avajs/tap-emitter that referenced this issue Mar 22, 2016
needed to reorder events because of: tapjs/tap-parser#25
jamestalmage added a commit to avajs/tap-emitter that referenced this issue Mar 22, 2016
had to modify event json because tap-reporter currently orders bails and assertions weird.

See: tapjs/tap-parser#25
@isaacs
Copy link
Member

isaacs commented Aug 18, 2016

Fixed in v2.

@isaacs isaacs closed this as completed in ddf44e2 Aug 18, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants