Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make toNotThrow say what was thrown #193

Open
jackfranklin opened this issue Feb 3, 2017 · 4 comments
Open

Make toNotThrow say what was thrown #193

jackfranklin opened this issue Feb 3, 2017 · 4 comments

Comments

@jackfranklin
Copy link

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 :)

@skovhus
Copy link
Contributor

skovhus commented Sep 5, 2017

I think this is fixed in expect@21 (maintained by Jest). : )

@ljharb
Copy link
Collaborator

ljharb commented Nov 24, 2017

@jackfranklin thanks, that'd be a great addition to expect v1 (v21+ is now maintained by jest, but we'll still publish releases of 1.x)

@jcollum
Copy link

jcollum commented Jul 6, 2018

Is toNotThrow still available? I can't find it in the docs.

https://jestjs.io/docs/en/expect.html

@ljharb
Copy link
Collaborator

ljharb commented Jul 7, 2018

@jcollum those docs cover v21+. This repo is for < v21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants