Make `toNotThrow` say what was thrown
Open
Nobody has claimed this yet.
enhancement
help wanted
- Dominant language
- JavaScript
- Stars
- 2.3k
- Forks
- 115
- PR merge metrics
- No merged PRs in 30d
Description
expect(() => foo()).toNotThrow
fails when foo throws, but it doesn't tell me what error foo threw. This would be really useful for debugging. I'm happy to make a PR :)
PS: I'm also happy to try to help out more if you need help with this module :)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the toNotThrow assertion and its existing tests. Confirm how a failure is currently reported, then make the failure identify what error foo threw and verify the updated message with the relevant assertion tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100