Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return tapeFn(testName, function (t) {
var end = t.end.bind(t)
// Call all beforeEach fns and set return as context
// to pass to test methods
var beforeEachReturns = beforeEach.map(function (be) {
return be()
})
t.context = merge.apply(null, beforeEachReturns)
t.end = function () {
afterEach.forEach(function (ae) {
ae({
context: t.context
})
})
end()
}
//
var ret = fn({
equal: t.equal,
deepEqual: t.deepEqual,
pass: t.pass,
return new Promise(function(resolve, reject){
resolve(merge.apply(merge, responses));
})
});