Duplicate .js file in coverage report
See original GitHub issueIssue
I’m seeing duplicate files in my coverage report, e.g: for every actions.ts
there’s a actions.ts.js
in the coverage table that actually doesn’t exist on the file system.
If I click on it in the HTML report, I get Unable to lookup source: <file>
.
Here’s the relevant part from my jest config:
"collectCoverage": true,
"coverageDirectory": "<rootDir>/build/tests/coverage-jest",
"collectCoverageFrom": [
"src/**/*.{ts,tsx}",
"!**/*.{spec,test}.{ts,tsx}",
"!**/tests/**"
],
"coveragePathIgnorePatterns": [
"node_modules",
"\\.(js)$"
]
I’m specifically including .ts(x) files and ignoring .js files, so not sure why they still get included.
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Duplicate Entries in code coverage report - Stack Overflow
I've added few JS test files and added below mentioned references. In some files I've added smaller case letters in some JS files...
Read more >No code coverage on .js files - SonarQube - Sonar Community
Trying to scan a ColdFusion application with a few JavaScript files. It looks like (from the screen output) that the .JS files were...
Read more >Sonar JavaScript Duplicates Detection
I have recently installed Sonar with the JavaScript Plugin, and have let the sonar-scanner analyze some sample projects. I started investigating the ...
Read more >React Testing using Jest along with code coverage report
js file, you can see that we have duplicate code of const wrapper = shallow(<TodoList />); It's repeated in the first and second...
Read more >Configuring Test Coverage - Code Climate
Configure your CI to temporarily store the reports from each separate test suite. We recommend syncing and fetching files from S3 as one...
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
@ssynix starting with version 20.0.0, coverage is no longer handled by ts-jest but by jest directly.
we need at least a minimal repo that reproduces this to move forward.
Excellent! You’re welcome!