mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-01 22:38:10 +08:00
Add collectCoverageFrom option to collect coverage on files without any tests. (#961)
This commit is contained in:
committed by
Dan Abramov
parent
0bd593baa7
commit
a0efbebee2
@@ -18,6 +18,7 @@ module.exports = (resolve, rootDir, isEjecting) => {
|
||||
const setupTestsFile = pathExists.sync(paths.testsSetup) ? '<rootDir>/src/setupTests.js' : undefined;
|
||||
|
||||
const config = {
|
||||
collectCoverageFrom: ['src/**/*.{js,jsx}'],
|
||||
moduleFileExtensions: ['jsx', 'js', 'json'],
|
||||
moduleNameMapper: {
|
||||
'^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': resolve('config/jest/FileStub.js'),
|
||||
|
||||
Reference in New Issue
Block a user