You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So this had me scratching my head for a while today.
The following fails as expected:
import{test}from'uvu'functionouch(){thrownewError('Oops!')}test('two wrongs do not make a right',async(context)=>{ouch()})test.run()
Result:
❯ node index.mjs
✘ (0 / 1)
FAIL "two wrongs do not make a right"
Oops!
at ouch (file:///home/aral/sandbox/uvu-test/index.mjs:4:9)
at Object.handler (file:///home/aral/sandbox/uvu-test/index.mjs:12:3)
at Number.runner (file:///home/aral/sandbox/uvu-test/node_modules/uvu/dist/index.mjs:77:16)
at Timeout.exec [as _onTimeout] (file:///home/aral/sandbox/uvu-test/node_modules/uvu/dist/index.mjs:138:39)
Total: 1
Passed: 0
Skipped: 0
Duration: 1.60ms
However, if you add an after.each() method that itself throws, the test run doesn’t fail (exits with a success status and without showing the error):
import{test}from'uvu'functionouch(){thrownewError('Oops!')}test.after.each(()=>{thrownewError('The sky is falling.')})test('two wrongs do not make a right',async(context)=>{ouch()})test.run()
I think to an extent this may be related to #191. I can probably update my PR for that to include a fix for this too. Looks like the error isn't being properly reported
So this had me scratching my head for a while today.
The following fails as expected:
Result:
However, if you add an
after.each()
method that itself throws, the test run doesn’t fail (exits with a success status and without showing the error):Result:
The text was updated successfully, but these errors were encountered: