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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to only run certain jest runners in watch mode #6189

Closed
DanielMSchmidt opened this issue May 15, 2018 · 10 comments
Closed

Add a way to only run certain jest runners in watch mode #6189

DanielMSchmidt opened this issue May 15, 2018 · 10 comments

Comments

@DanielMSchmidt
Copy link
Contributor

馃殌 Feature Proposal

I would like to be able to select certain jest runners to run in watch mode while being in watch mode.

Motivation

I have projects where I want to configure ~5 different runners. Having them all run in watch mode makes it hard to read the output of debug statements I do in jest unit tests for example.

Example

I would like to be able to run all runners & tests, see that one test is failing, select the runner it's failing on, add debug statements to the test, fix the test, go back to all runners being started without needing to stop and restart jest.

Pitch

It needs to go to the core because runners are a part of core and so is the nice watch mode screen I would like to extend.

@DanielMSchmidt
Copy link
Contributor Author

Just as a note on this: I would be willing to do a PR, but I would need some information before I start:

  1. What would be good shortcuts to use for selecting a runner / going back to all runners?
  2. Should we select the runners by checkboxes or should it be a search like with the test names?
  3. Is it currently possible to start the watch mode for only a limited set of runners? If so, we should disable this feature right?

@rickhanlonii
Copy link
Member

I think you'll be able to configure this on your own when we land custom watch mode plugins in Jest 23 馃憣

@SimenB
Copy link
Member

SimenB commented May 15, 2018

Having a way to say which project you want to run would be awesome. A custom watch mode to set it would be fine, but we need the filtering first

@DanielMSchmidt
Copy link
Contributor Author

@rickhanlonii That sounds like an awesome feature. Would you think is it not of enough value for the "normal" user, so we shouldn't add it to core?

@rogeliog
Copy link
Contributor

@DanielMSchmidt I published https://github.com/rogeliog/jest-watch-select-projects.

select-project

From what I understand, it should solve this issue. I'll close it, but feel free to reopen it if I'm wrong 馃檭

@SimenB
Copy link
Member

SimenB commented May 31, 2018

Awesome! 馃帀

I think we should include a project filter in Jest core. I'm fine with the watch plugin living outside, but we should have some way of saying jest --runWithProject lint or something.

Then you can use that same configuration in the plugin 馃檪

@SimenB SimenB reopened this May 31, 2018
@DanielMSchmidt
Copy link
Contributor Author

Sounds great 馃憤 I would be willing to do this to learn a bit more about jest's internals if that's okay for you :)

@SimenB
Copy link
Member

SimenB commented May 31, 2018

Yes, please go for it!

@SimenB
Copy link
Member

SimenB commented Dec 21, 2018

Can track the remaining work in #7542

@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 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants