mjackson / mjackson/expect

Make `toNotThrow` say what was thrown

Open
#193 4 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.