Feature Proposal: Keyboard shortcut to run the nth failing test in watch mode
See original GitHub issue🚀 Feature Proposal
In watch mode, run the nth failed test by typing a string that matches this pattern: /\d+f/
.
Motivation
Two motivations
- Easy navigation to the failing test you want to tackle first when faced with a number of them, without having to copy paste the test name
- When refactoring, oftentimes many tests will fail simultaneously. If the output is particularly noisy it can be more useful to run a single failing test. In these noisy output scenarios it can sometimes also be hard to find the names of tests in the output, so having an easy way to just pick off the first failing test would be nice
Example
- Test run shows n failing tests
- Typing
1f
will rerun the test suite, but scoped to the first of the failing tests - Hitting enter will rerun just this test
- Hitting f returns to all tests mode (same as normal f behaviour)
- Typing
{n}f
. where n is an integer will switch to running the nth failed test
Pitch
Relying on copying and pasting strings from reams of console output isn’t the kind of slick, sophisticated developer experience I expected when I first tried jest. I think you should aim to make running single tests as simple as any of the other keyboard nav filtration options
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Jest in watch mode didn't work - Questions - n8n community
Watch Usage › Press a to run all tests. › Press f to run only failed tests. › Press p to filter by...
Read more >Report - Investigation of the Challenger Accident - GovInfo
The Committee found that NASA's drive to achieve a launch ... Challenger accident was caused by a failure in the aft field joint...
Read more >Troubleshoot Common L2L and Remote Access IPsec VPN ...
Here is the command to enable NAT-T on a Cisco Security Appliance. The 20 in this example is the keepalive time (default). PIX/ASA...
Read more >Keyboard shortcut for debugging the LAST test run in Visual ...
Ctrl + R , L will repeat the last run, but not in debug mode. If you are debugging a test, and it...
Read more >Distance Education for Teacher Training: Modes, Models, and ...
characteristics of various technologies as they relate to distance learning for teachers but also to ground them in their benefits and drawbacks as...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I like this idea! What about adding it as part of typeahead, with it just filtering failing tests?
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. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.