-
-
Couldn't load subscription status.
- Fork 33.6k
Closed
Labels
assertIssues and PRs related to the assert subsystem.Issues and PRs related to the assert subsystem.
Description
See https://github.com/nodejs/node/blob/master/lib/assert.js#L305
Here, you test for !shouldThrow and expectedException(...).
In case of assert.throws() shouldThrow is always true and the above test will always fail, causing the instanceof test to never fail.
I think that the correct statement would be
if (shouldThrow && !expectedException(actual,expected))
Metadata
Metadata
Assignees
Labels
assertIssues and PRs related to the assert subsystem.Issues and PRs related to the assert subsystem.