Watch option is ignored when creating JestHasteMap
See original GitHub issueDo you want to request a feature or report a bug? bug
What is the current behavior? watch is hardcoded to true when creating JestHasteMap: https://github.com/facebook/metro/blob/master/packages/metro/src/node-haste/DependencyGraph.js#L96
If the current behavior is a bug, please provide the steps to reproduce and a minimal repository on GitHub that we can yarn install
and yarn test
.
https://github.com/hfter789/metro
jest packages/metro/src/integration_tests/__tests__/buildGraph-test.js
What is the expected behavior?
JestHasteMap should receive the watch
value coming from metro config.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:12
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Configuring Jest
This option tells Jest that all imported modules in your tests should be mocked automatically. All modules used in your tests will have...
Read more >jest/index.ts at main · facebook/jest - GitHub
The data structures created by `jest-haste-map` can be used directly from the. * cache without further processing. The metadata objects in the `files`...
Read more >Top 5 jest-haste-map Code Examples - Snyk
Learn more about how to use jest-haste-map, based on jest-haste-map code examples created from the most popular ways it is used in public...
Read more >babel-jest - Awesome JS
[babel-plugin-jest-hoist] Ignore TSTypeQuery when checking for hoisted ... Fix inconsistent workspace prefixes (#13217); [jest-haste-map] Expose a minimal ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry for the possible noise on a ticket that might be unrelated but, wanted to add that similar to @FLGMwt , our project needs to have the
bundle
command not watch for files on CI (JitPack in our case). Would appreciate any pointers on how to suppress file watching inreact-native bundle
if possible. 😬 🙇Edit: for the project I’m currently working on, I’ve put a ugly nasty solution in place: to replace the
node-haste/DependencyGraph.js
file with one that has thewatch:
flag asfalse
. My hands feel very dirty now, but that unblocks our CI pipeline for the time being.before update release, I have to use the patch in this way:
replace the
watch: true
withwatch: false
while building on the CI pipelines.