Created
December 31, 2019 17:56
-
-
Save isaacs/3cc8394c351ead9d208748037b338764 to your computer and use it in GitHub Desktop.
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
const t = require('tap') | |
t.test('throw immediately', t => { | |
throw new Error('thrown immediately') | |
}) | |
t.test('throw in nextTick', t => { | |
process.nextTick(() => { | |
throw new Error('thrown in next tick') | |
}) | |
}) | |
t.test('throw in timeout', t => { | |
setTimeout(() => { | |
throw new Error('thrown in timeout') | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
node 13.4:
node 13.5: