Skip to content

Instantly share code, notes, and snippets.

@substack substack/output
Created Jul 27, 2012

Embed
What would you like to do?
tap bug when the 'end' listener throws
$ node t.js
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
end()
^C
var test = require('tap').test;
test(function (t) {
t.plan(1);
t.on('end', function () {
console.log('end()');
throw new Error('beep');
});
t.equal(3, 3);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.