Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
Closed
Labels
assertIssues and PRs related to the assert subsystem.Issues and PRs related to the assert subsystem.docIssues and PRs related to the documentations.Issues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.
Description
nodejs/node-v0.x-archive#6470 is an old PR that never landed but points to a valid issue.
The test case:
varassert=require('assert');assert.doesNotThrow(function(){thrownewError();});Prints the error stack but does not output an AssertionError.
However,
varassert=require('assert');assert.doesNotThrow(function(){thrownewError();},Error);Raises an Assertion Error (AssertionError: Got unwanted exception (Error)..
varassert=require('assert');assert.doesNotThrow(function(){throw'custom message';});And
varassert=require('assert');assert.doesNotThrow(function(){throw'custom message';},'custom message');Both just output custom message without raising the Assertion Error.
The solution submitted in nodejs/node-v0.x-archive#6470 should be investigated as a possible fix but possibly needs to be revisited.
Metadata
Metadata
Assignees
Labels
assertIssues and PRs related to the assert subsystem.Issues and PRs related to the assert subsystem.docIssues and PRs related to the documentations.Issues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.