Created
March 4, 2014 04:11
-
-
Save max-mapper/9340149 to your computer and use it in GitHub Desktop.
partial tap output w/ how long each test took
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 time = +Date.now() | |
var testId = 0 | |
console.log('TAP version 13') | |
tape.createStream({ objectMode: true }).on('data', function (row) { | |
if (row.type === 'test') { | |
console.log('# ' + row.name) | |
} | |
if (row.type === 'assert') { | |
testId++ | |
var now = +Date.now() | |
var diff = now - time | |
time = now | |
console.log(row.ok ? 'ok' : 'not ok', testId, row.name, '-', diff + 'ms') | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment