From 01d0f8d859ca0c2691e5f92ebb350a31d3c7b22e Mon Sep 17 00:00:00 2001 From: Scott Tsuchiyama Date: Fri, 14 Oct 2016 12:48:37 -0700 Subject: [PATCH 1/2] pick up all files for coverage reporting --- packages/react-scripts/utils/createJestConfig.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-scripts/utils/createJestConfig.js b/packages/react-scripts/utils/createJestConfig.js index 39c864ab8f4..c9f1d0bf23c 100644 --- a/packages/react-scripts/utils/createJestConfig.js +++ b/packages/react-scripts/utils/createJestConfig.js @@ -23,6 +23,8 @@ module.exports = (resolve, rootDir, isEjecting) => { '^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': resolve('config/jest/FileStub.js'), '^.+\\.css$': resolve('config/jest/CSSStub.js') }, + coveragePathIgnorePatterns: ['src/index.js', '/node_modules/', '/vendor/'], + collectCoverageFrom: ['src/**/*.{js,jsx}'], setupFiles: [resolve('config/polyfills.js')], setupTestFrameworkScriptFile: setupTestsFile, testPathIgnorePatterns: ['/(build|docs|node_modules)/'], From bd7a41880cc12b87455e67b6f3ed9f5b83eba333 Mon Sep 17 00:00:00 2001 From: Scott Tsuchiyama Date: Tue, 25 Oct 2016 08:14:53 -0700 Subject: [PATCH 2/2] remove index.js from coverage --- packages/react-scripts/utils/createJestConfig.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/utils/createJestConfig.js b/packages/react-scripts/utils/createJestConfig.js index c9f1d0bf23c..71b1b0787dd 100644 --- a/packages/react-scripts/utils/createJestConfig.js +++ b/packages/react-scripts/utils/createJestConfig.js @@ -23,7 +23,7 @@ module.exports = (resolve, rootDir, isEjecting) => { '^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': resolve('config/jest/FileStub.js'), '^.+\\.css$': resolve('config/jest/CSSStub.js') }, - coveragePathIgnorePatterns: ['src/index.js', '/node_modules/', '/vendor/'], + coveragePathIgnorePatterns: ['/node_modules/', '/vendor/'], collectCoverageFrom: ['src/**/*.{js,jsx}'], setupFiles: [resolve('config/polyfills.js')], setupTestFrameworkScriptFile: setupTestsFile,