Skip to content

Commit cb63c09

Browse files
mackbytealexdriaguine
authored andcommitted
Add collectCoverageFrom option to collect coverage on files without any tests. (facebook#961)
1 parent 930a7c7 commit cb63c09

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/react-scripts/utils/createJestConfig.js

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module.exports = (resolve, rootDir, isEjecting) => {
1818
const setupTestsFile = pathExists.sync(paths.testsSetup) ? '<rootDir>/src/setupTests.js' : undefined;
1919

2020
const config = {
21+
collectCoverageFrom: ['src/**/*.{js,jsx}'],
2122
moduleFileExtensions: ['jsx', 'js', 'json'],
2223
moduleNameMapper: {
2324
'^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': resolve('config/jest/FileStub.js'),

0 commit comments

Comments
 (0)