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

Interactive mode for all failing tests #7685

Closed
alisabzevari opened this issue Jan 23, 2019 · 4 comments · Fixed by #10858
Closed

Interactive mode for all failing tests #7685

alisabzevari opened this issue Jan 23, 2019 · 4 comments · Fixed by #10858

Comments

@alisabzevari
Copy link

🚀 Feature Proposal

Jest's interactive snapshot mode is awesome. Would it be possible to enable a similar feature to interactively run every failing test one-by-one?

Motivation

When changing something that breaks a lot of tests, I have to run all the tests to find the failing tests and try to fix them one-by-one (either fixing test or the code). Then I have to run all the failing tests again to make sure it is now fixed. Another way would be to run tests separated by files or test names (which is also painful). I was wondering whether it is possible to have the interactive mode for non-snapshot tests? To run every failing test one-by-one and proceed to next test when the user decides to or when the test passed.

I think this feature should belong to jest-cli but I didn't know where to create an issue for that.

@jeysal
Copy link
Contributor

jeysal commented Jan 23, 2019

Thanks for the suggestion!

I think this feature should belong to jest-cli but I didn't know where to create an issue for that.

You're in the right place, this repo contains all parts of Jest, including jest-cli :)

@NullDivision
Copy link
Contributor

I really want this feature to be added. Its one of the things that have been bugging me for well over a year now. If a standard could be agreed on I wouldn't mind putting in the elbow grease to make it happen.

Personally, I wouldn't mind interactive mode including failed tests in general (same i hotkey in watch mode). Adding another flag seems redundant and would reduce the number of hotkeys to remember.

@jeysal
Copy link
Contributor

jeysal commented May 25, 2020

I'm not opposed to this feature being added :) @thymikee @SimenB just in case someone has concerns.
But it's definitely not a small thing to implement.

I'd agree with using the same i hotkey to step through all failing tests.
There's the edge case we need to look at where some of the failing tests are snapshot failures and some are not.
Options:

  • Step through snapshots with update options first, then step through regular failures
  • Other way around, step through non-snapshot failures first
  • Step through snapshots only (once all resolved will have to press i againto go through normal failures; thei` button description changes depending on whether there are snapshot failures)

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants