Do you want to request a feature or report a bug?
Feature
What is the current behavior?
Interactive watch mode
If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can yarn install and yarn test.
What is the expected behavior?
Having a non interactive watch mode
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
This doesn't make any sense.
This doesn't make any sense.
@cpojer Can you expand on that?
I found this issue while googling for the exact same thing. I'm running webpack and jest --watch from the same script and just want to see the tests results on change (without clearing the terminal) which is the behaviour I used before with karma/mocha. I could run jest in another terminal but that seems a bit silly
Run Jest without --watch then.
Yes, except it won't run on changes.
Basically what @wood1986 and I want (at least me) is the output of jest without --watch, ie printing the tests results but still re-run them automatically on change.
@cpojer another +1 with my explanation here. I use a process manager to start up all of the necessary processes for local dev for my project, including a ruby test runner (guard), jest, and webpack-dev-server (which also runs eslint & notifies). While guard has a non-interactive mode that doesn't take over the whole console, jest doesn't play nice and wipes out my whole console, clearing the output from guard & others.
You can do CI=true jest --watch which removes colors and terminal clearing
@SimenB thanks! Any idea why CI=true behaves differently from --ci?
It makes this function return false: https://github.com/facebook/jest/blob/aff9681e397d38be96e0fa4bd6868ef50fe2fc77/packages/jest-util/src/is_interative.js#L3, --ci is just for snapshots: https://github.com/facebook/jest/commit/e16431bd920b50b1318bb783df5f49100683afef
Most helpful comment
Yes, except it won't run on changes.
Basically what @wood1986 and I want (at least me) is the output of
jestwithout--watch, ie printing the tests results but still re-run them automatically on change.