-
-
Save juliangruber/d680eef1a755ecbb23eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tap = require('tap'); | |
var runner = require('..'); | |
module.exports = function(opts){ | |
var tests = []; | |
opts.runTest = function*(t){ | |
tests.forEach(function(test){ | |
tap.test(test.name, function(t){ | |
t.browser = getBrowser(); | |
test.fn(t); | |
}); | |
}); | |
}; | |
process.nextTick(function(){ | |
runner(opts); | |
}); | |
return function test(name, fn){ | |
if (arguments.length == 1) { | |
fn = name; | |
name = undefined; | |
} | |
tests.push({ name: name, fn: fn }); | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment