UNPKG

scotch-tape

Version:
18 lines (13 loc) 389 B
'use strict'; 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; }