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

Flag for forcing Jest to run all tests without prompt #1788

Closed
gustavjf opened this issue Sep 23, 2016 · 4 comments
Closed

Flag for forcing Jest to run all tests without prompt #1788

gustavjf opened this issue Sep 23, 2016 · 4 comments

Comments

@gustavjf
Copy link

Do you want to request a feature or report a bug?

Feature.

What is the current behavior?

Running Jest defaults to prompting for input (i.e., a for running all the tests, q for quit, etc.).

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal repository on GitHub that we can npm install and npm test.

It's not a bug.

What is the expected behavior?

For Jest to run all tests and then exit without prompt. Running Jest in a Docker container and having this prompt slows down development. It would be useful to have a flag that forces all tests to run and exit after the suite finishes. --bail flag does not cover this use case as it's for failing tests.

Run Jest again with --debug and provide the full configuration it prints. Please mention your node and npm version and operating system.

N/A

I haven't found a flag that has this functionality and I'm unsure if it's already supported.

@gustavjf gustavjf changed the title Force Jest to run all tests without prompt Flag for forcing Jest to run all tests without prompt Sep 24, 2016
@cpojer
Copy link
Member

cpojer commented Sep 24, 2016

Are you using create-react-app? Jest should exit normally assuming you clean up all your resources.

@gustavjf
Copy link
Author

https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#command-line-interface

When you run npm test, Jest will launch in the watch mode. Every time you save a file, it will re-run the tests, just like npm start recompiles the code.

You're absolutely right. My mistake.

@franklinjavier
Copy link

@gustavjf you can run with CI=true yarn test

@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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants