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
For few custom errors the t.throws weren't detecting the error type I passed to t.throws to assert with. The problem occurs because core-assert isn't giving the right match response on checking the error type based in the prototype. I have fixed that locally and now my tests are passing. Please accept my PR sindresorhus/core-assert#2 and bump it up on ava dependencies.
The plan is to refactor t.throws() to move away from core-assert: #1047 (comment)
Regardless, we'll enforce that constructors are extending Error. Is that the case with NotFoundObject? Going by AVA's error output it looks like it's a standalone class. That might also be why your test is currently failing.
Description
For few custom errors the
t.throws
weren't detecting the error type I passed tot.throws
to assert with. The problem occurs because core-assert isn't giving the right match response on checking the error type based in the prototype. I have fixed that locally and now my tests are passing. Please accept my PR sindresorhus/core-assert#2 and bump it up on ava dependencies.Test Source
Error Message & Stack Trace
Environment
Node.js v7.10.0
darwin 16.6.0
ava 0.22.0
npm 4.2.0
The text was updated successfully, but these errors were encountered: