scotch-tape
Version:
wrapper to write better tape tests
18 lines (13 loc) • 389 B
JavaScript
;
var scotchTape = require('./scotch-tape');
var Test = require('tape').Test;
module.exports = scotchAsserts;
function scotchAsserts(customAsserts) {
customAsserts = customAsserts || {};
Object.keys(customAsserts).forEach(function add(assert) {
if (!Test.prototype[assert]) {
Test.prototype[assert] = customAsserts[assert];
}
});
return scotchTape;
}