diff --git a/.gitignore b/.gitignore index 4a5ee8d98..38cd07b99 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,9 @@ coverage # nyc test coverage .nyc_output +# Coverage directory used by Jest +test-coverage + # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) .grunt diff --git a/jest.config.js b/jest.config.js index 0447c14d4..5bf33e082 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,4 +1,22 @@ module.exports = { + testRegex: '/*.test.js$', + collectCoverage: true, + collectCoverageFrom: [ + '**/*.{js,jsx}', + '!\\.cache/**', + '!node_modules/**', + '!public/**', + ], + coverageReporters: ['lcov'], + coverageDirectory: 'test-coverage', + coverageThreshold: { + global: { + branches: 0, + functions: 0, + lines: 0, + statements: 0, + }, + }, transform: { '^.+\\.jsx?$': `/jest-preprocess.js`, },