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
TAP version 13
ok 1 Error reason, function handler
Error: Process exited before tests finished running
Last test to run (Error reason, arrow handler, sync) has an async hold. Ensure all assert.async() callbacks are invoked and Promises resolve. You should also set a standard timeout via QUnit.config.testTimeout.
So it barfed on the second test. If I skip the second one, I get:
TAP version 13
ok 1 Error reason, function handler
ok 2 # SKIP Error reason, arrow handler, sync
not ok 3 Error reason, arrow handler, async
---
message: "Promise rejected during \"Error reason, arrow handler, async\": Function has non-object prototype 'undefined' in instanceof check"
severity: failed
actual : null
expected: undefined
stack: |
TypeError: Function has non-object prototype 'undefined' in instanceof check
at Function.[Symbol.hasInstance] (<anonymous>)
...
1..3
# pass 1
# skip 1
# todo 0
# fail 1
I'm not sure if that sync/async behavior is related, or is a separate issue.
The error message is reminiscent of #1389, and likely a similar fix should resolve it.
The text was updated successfully, but these errors were encountered:
…rejects()`
Validation and matching are now the same between `assert.throws` and `assert.rejects`.
This fixed the inability to use arrow functions with `rejects()`, as previously fixed for `throws()`, #1630.
This also (temporarily) loosens `assert.rejects` to tolerate and silently ignore all falsey expected value.
We'll deprecate that for both methods in a follow-up.
Non-function values passed as block to assert.throws() now result in a simulated assertion
failure with descriptive error message, instead of previously where we failed via `block.call()`
throwing a TypeError which the user presumably would not have been (wanting to be) matching.
This fixes#1637.
Fixes#1630.
Fixes#1637.
Tell us about your runtime:
When the reject "reason" is a string, both
function
handlers and "fat-arrow" functions work well (both of these pass):However, when the "reason" is an Error object, the function handlers work well, but the fat-arrow's do not:
If I run that as written, I see
So it barfed on the second test. If I
skip
the second one, I get:I'm not sure if that sync/async behavior is related, or is a separate issue.
The error message is reminiscent of #1389, and likely a similar fix should resolve it.
The text was updated successfully, but these errors were encountered: