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.
Are you using create-react-app? Jest should exit normally assuming you clean up all your resources.
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.
@gustavjf you can run with CI=true yarn test
Most helpful comment
@gustavjf you can run with
CI=true yarn test