-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[Feature]: Jest should use the debugger
statement on failure
#15168
Comments
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
Up |
Huh, interesting feature request! I like it. Not sure where it would be hooked up, tho. In |
Ideally as close to the test code as possible or somewhere you can know what failed I guess. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
Keep issue alive |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🚀 Feature Proposal
By default,
jest
should use thedebugger
statement on assertion failure. This could also be behind a configuration parameter.Motivation
This would make it way easier when using a debugger to break directly on failing assertions instead of having to put breakpoints manually, or break on all "Caught exceptions" which means you would break on your own exceptions too.
Example
No response
Pitch
Some test is failing and you want to debug it.
You run it through the debugger, but the process exits right after the exception failed.
You realize you now need to put, manually, a breakpoint after finding the line throwing the assert. Worse, if you happen to have some reusable function that wraps jest's
expect
call, you might break many times before finally finding the call that actually causes issues.All of this could have been avoided if you let the test framework tell the debugger when to break !
The text was updated successfully, but these errors were encountered: