UNPKG

timed-tape

Version:

Prints the time each tape test took

12 lines (11 loc) 272 B
module.exports = function (tape) { return function () { var t = tape.apply(this, arguments) var start = Date.now() t.on('end', function () { var now = Date.now() console.log('# time: ' + Math.round(now - start) + ' ms') }) return t } }