Open
Description
ospec version: 4.1.1
node version: 14.15.4
throws
does not seem to catch exceptions from async
functions.
Code
o("synchronous", function() {
o(() => {throw new Error()}).throws(Error)
})
o("asynchronous", function() {
o(async () => {throw new Error()}).throws(Error)
})
Expected behavior
––––––
All 2 assertions passed (old style total: 2)
Current behavior
asynchronous:
[AsyncFunction (anonymous)]
should throw a
[Function: Error] { stackTraceLimit: 10 }
at /home/vis/dev/repositories/2020-04-pqmail-prototype/report.js:6:40
––––––
1 out of 2 assertions failed (old style total: 2)