Skip to content

Instantly share code, notes, and snippets.

@KoryNunn
Last active October 19, 2016 01:37
Show Gist options
  • Save KoryNunn/a7ddbfb069bbbb2a41b4 to your computer and use it in GitHub Desktop.
Save KoryNunn/a7ddbfb069bbbb2a41b4 to your computer and use it in GitHub Desktop.
tape async series tests
var test = require('tape'),
righto = require('righto'),
noop = function(){},
last = righto.sync(noop);
module.exports = function(name, options, task){
if(arguments.length < 3){
task = options;
options = null;
}
test(name, options, function(t){
last = righto(function(done){
t.on('end', done);
task(t, done);
}, righto.after(last));
last(noop);
});
};
module.exports.only = test.only;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment