Running jest in docker with watch option throw me not supported without git/hg error
See original GitHub issueDo you want to request a feature or report a bug?
bug
What is the current behavior?
Running with jest --watch
in docker exits with --watch is not supported without git/hg, please use --watchAll error
.
Running with jest --watchAll
could run test successfully, however when I am trying to update snapshot with option u
or o
it still exits with --watch is not supported without git/hg, please use --watchAll
error.
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/zushenyan/docker-jest-issue
What is the expected behavior?
Running Jest in Docker without errors like local machine.
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
- docker Version 17.12.0-ce-mac49 (21995)
- node 8.9.4-alpine
- jest 22.2.2
- yarn 1.3.2 (included in node:8.9.4-alpine)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:12 (1 by maintainers)
Top GitHub Comments
I have the same problem, but my container DOES have git installed. I even installed watchman on it (built from source) but no luck
Actually it was me being silly~
Docker image
node:8.9.4-alpine
doesn’t come withgit
orhg
utilities.--watch is not supported without git/hg
as this error says, to get Jest work with normal watch mode you will have to install these utilities manually in your image.For anyone puzzled by this issue please take a look at this branch for solution.
Thank you guys for answering.