Skip to content

Commit

Permalink
Override Jest config collectCoverageFrom with package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansully committed Feb 26, 2017
1 parent 68e9bb9 commit ec18454
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/react-scripts/utils/createJestConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,9 @@ module.exports = (resolve, rootDir, isEjecting) => {
if (rootDir) {
config.rootDir = rootDir;
}
const packageConfig = require(paths.appPackageJson).jest;
if (packageConfig) {
config.collectCoverageFrom = packageConfig.collectCoverageFrom || config.collectCoverageFrom;
}
return config;
};

0 comments on commit ec18454

Please sign in to comment.