$ node ./example/test-error.js
$ echo $? # prints 1, an error
1
$ node ./example/test-error.js | tap-summary
$ echo $? # prints 0, no error
0
$ node ./example/test-error.js | ./bin/cmd.js # as modified in PR
$ echo $? # prints 1, an error
1
Last active
June 6, 2016 09:54
-
-
Save Hypercubed/f0e4514bc9aec5cc5c9e814bbc1dab2d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 test = require('tape') | |
var math = require('./math') | |
test('t.plan', function(t) { | |
t.plan(3) | |
t.equal( | |
math.toFixed(2.385, 2), | |
'2.39' | |
) | |
next(function () { | |
t.whatIsThisFunction(); // causes an uncaught error | |
t.equal( | |
math.toFixed(2.384, 2), | |
'2.38' | |
) | |
t.equal( | |
math.toFixed(2, 2), | |
'2.00' | |
) | |
}) | |
}) | |
function next(fn) { | |
setTimeout(function() { | |
fn() | |
}, 100) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment