Wrong coverage when running Jest with nested config
See original GitHub issueThis is my Jest configuration:
module.exports = {
"roots": [
"../../src/"
],
"moduleDirectories": [
"node_modules",
"src"
],
"moduleFileExtensions": [
"js",
"jsx"
],
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"./mocks/file.mock.js",
"^.+\\.(css|scss)$": "identity-obj-proxy"
},
"setupFiles": [
"./enzyme.config.js"
],
"snapshotSerializers": [
"enzyme-to-json/serializer"
],
"testURL": "http://localhost/",
"transform": {
"^.+\\.jsx?$": "babel-jest"
}
};
This is my Enzyme file configuration:
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
configure({ adapter: new Adapter() });
And this is the screenshot:
It seems like all the test are detected and passing but the files table is displayed incorrectly. The table should have all files that are shown above and not a configuration file.
I run the tests with the following command: jest --config devtools/test/jest.config.js --coverage --no-cache
Issue Analytics
- State:
- Created 5 years ago
- Comments:11
Top Results From Across the Web
Run Jest test and collect coverage from all files in a specific ...
I am using the following code to run Jest test on specific file. jest utils.spec.js --collectCoverageFrom=**/utils.js.
Read more >Configuring Jest
The bail config option can be used here to have Jest stop running tests ... The babel and v8 coverage providers use /*...
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 Tutorial - JavaScript Unit Testing Using Jest Framework
In this Jest tutorial, we will learn about various Jest features, Jest matchers and how to use Jest framework for JavaScript Unit Testing....
Read more >Mocha - the fun, simple, flexible JavaScript test framework
Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, ... Configuring Mocha (Node.js); The test/ Directory; Error Codes ......
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
Can you setup a downloadable repro so we can investigate if this is a bug?
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.