question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

  1. 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
  2. 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
SimenBcommented, Oct 31, 2018

I like this idea! What about adding it as part of typeahead, with it just filtering failing tests?

0reactions
github-actions[bot]commented, Apr 30, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found