Issue with jest --coverage
See original GitHub issueReproducible demo: https://github.com/stereobooster/babel-macro-issue/tree/import-all
yarn
yarn test # Ok
yarn test:ci # Ok
But
yarn test:coverage
yarn run v1.5.1
$ CI=true react-scripts test --env=jsdom --coverage
FAIL src/App.test.js
● Test suite failed to run
import-all.macro: This is not supported: ``. Please see the import-all.macro documentation Learn more: https://www.npmjs.com/package/import-all.macro
at node_modules/import-all.macro/dist/macro.js:28:13
at Array.forEach (<anonymous>)
at prevalMacros (node_modules/import-all.macro/dist/macro.js:20:22)
at macroWrapper (node_modules/babel-plugin-macros/dist/index.js:54:12)
at applyMacros (node_modules/babel-preset-react-app/node_modules/babel-plugin-macros/dist/index.js:164:5)
at PluginPass.ImportDeclaration (node_modules/babel-preset-react-app/node_modules/babel-plugin-macros/dist/index.js:82:9)
at newFn (node_modules/@babel/core/node_modules/@babel/traverse/lib/visitors.js:243:21)
at NodePath._call (node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js:65:18)
at NodePath.call (node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js:40:17)
at NodePath.visit (node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js:100:12)
Issue Analytics
- State:
- Created 5 years ago
- Comments:20 (8 by maintainers)
Top Results From Across the Web
Issues with Jest Coverage and Cache after upgrading from ...
Bug Report After upgrading from Jest v26.6.0 to v26.6.2 I started to experience missing files in the code coverage report.
Read more >Jest finds tests but doesn't collect coverage
The quick fix I said in my comment, using --watchAll instead, eg: react-scripts test --coverage --watchAll . Just for future reference, ...
Read more >jest - tests passing, but code coverage fails!
I'm testing whether a page renders or not. The page takes some time to contact an API and therefore to render, so I've...
Read more >Configuring code coverage in Jest, the right way
In this brief tutorial we see how to configure code coverage for Jest, the right way.
Read more >Jest CLI Options
... only be disabled if you are experiencing caching related problems. ... Indicates that test coverage information should be collected and ...
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 Free
Top 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
https://github.com/babel/babel/issues/7596 This is the original issue we found before. I was trying to fix the issue in Babel by referring parent paths to right ones, but not done yet.
Verified fix with small example. Opened PR in create-react-app.
@fatfisz is a hero