jest
jest copied to clipboard
[Bug]: collectCoverageFrom not working for react components
Version
26.6.0
Steps to reproduce
Add to package.json
....
"jest": {
"collectCoverageFrom": [
"src/**/*.ts,tsx}",
"!src/**/*.d.ts"
]
},
have some folders like:
src/components/header/index.tsx
those files are not included in the output table
Expected behavior
React testing library would include coverage reports for React component when the globbed..
Actual behavior
React component do not show up in cov report
Additional context
No response
Environment
System:
OS: macOS 12.3
CPU: (10) arm64 Apple M1 Max
Binaries:
Node: 16.16.0 - /usr/local/bin/node
Yarn: 1.22.0 - ~/.yarn/bin/yarn
npm: 8.11.0 - /usr/local/bin/npm
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.