Jest: watchAll not running tests on save.

Created on 7 Sep 2017  路  5Comments  路  Source: facebook/jest


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

Bug

What is the current behavior?

When running --watchAll the test don't run on file save. They do if i use --watch.

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.

https://github.com/truckingsim/jest_bug_example

Install the packages and then in separate tabs side by side ( or one at a time this happens either way) run npm test in one and npm run test-changes in the other. Edit add.js to fix the ReferenceError on line 2, and save. Thetest-changes command is the expected behavior with --watch. The tests run on file save. The test command is watchAll the tests don't re-run on save.

What is the expected behavior?

Jest should run the tests on file save.

Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.

No jest config, versions are:

Jest - 21.0.1,
Node - 8.4.0
npm - 5.3.0
OS - MacOS Sierra 10.12.6

This happens with or without watchman, but I also have watchman version 4.9.0 installed.

Bug Confirmed

Most helpful comment

This was working on Jest 20.0.4, this only happened after upgrading to 21.0.1.

All 5 comments

This was working on Jest 20.0.4, this only happened after upgrading to 21.0.1.

I'm also able to reproduce it, seems like a regression in 21.0.1

@rogeliog Do I still need to create a jest bug example like @truckingsim asked for or is it not necessary at this point ?

Hi i'm getting the same bug with "jest": "^21.1.0", :(

@GiancarlosIO if you update to the latest version of jest it should fix the watchAll for you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hramos picture hramos  路  3Comments

samzhang111 picture samzhang111  路  3Comments

rosiakr picture rosiakr  路  3Comments

kentor picture kentor  路  3Comments

mmcgahan picture mmcgahan  路  3Comments