Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Abusing tape reporting stream to provide post-test cleanup
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "tape test*.js"
},
"author": "",
"license": "ISC"
}
var test = require("tape");
var ts = test.createStream();
ts.pipe(process.stdout);
ts.on("end", function() {
console.log("Bye!");
});
test(function(t) {
t.pass();
t.end();
});
var test = require("tape");
test(function(t) {
t.pass();
t.end();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment