ifError doesn't throw
- Dominant language
- JavaScript
- Stars
- 1.9k
- Forks
- 359
- PR merge metrics
- No merged PRs in 30d
Description
I think the problem is that ifError assertion which is simply "if (error) throw error;" is getting wrapped by assertWrapper which contains a try/catch. This stops the throw from escaping and exiting the test method where it appears. Is it possible that the fix is simply to avoid wrapping the ifError assertion?
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the ifError assertion and assertWrapper implementation in the Nodeunit source, then trace how the assertion is invoked from a test method. Reproduce the reported behavior with a focused test if the existing tests do not cover it. Done means ifError propagates an error as intended without breaking other wrapped assertions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100