Jest: Feature Request: Non interactive watch mode

Created on 17 Mar 2017  路  8Comments  路  Source: facebook/jest


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.

Most helpful comment

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.

All 8 comments

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?

Was this page helpful?
0 / 5 - 0 ratings