Skip to content
This repository has been archived by the owner on Mar 22, 2020. It is now read-only.

Commit

Permalink
Move jest config to its own file
Browse files Browse the repository at this point in the history
  • Loading branch information
flexdinesh committed Mar 3, 2018
1 parent 7ba5b5d commit eaadf50
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
27 changes: 27 additions & 0 deletions config/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module.exports = {
collectCoverageFrom: [
'app/**/*.{js,jsx}',
'!app/**/*.test.{js,jsx}',
'!app/*/RbGenerated*/*.{js,jsx}',
'!app/app.js',
'!app/*/*/Loadable.{js,jsx}'
],
coverageThreshold: {
global: {
statements: 98,
branches: 91,
functions: 98,
lines: 98
}
},
coverageReporters: ['json', 'lcov', 'text-summary'],
moduleDirectories: ['node_modules', 'app'],
moduleNameMapper: {
'.*\\.(css|less|styl|scss|sass)$':
'<rootDir>/config/jest-mocks/cssModule.js',
'.*\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/config/jest-mocks/image.js'
},
setupTestFrameworkScriptFile: '<rootDir>/config/test-setup.js',
testRegex: 'tests/.*\\.test\\.js$'
};
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./config/jest.config');
28 changes: 0 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,34 +28,6 @@
"test": "cross-env NODE_ENV=test jest --coverage",
"test:watch": "cross-env NODE_ENV=test jest --watchAll"
},
"jest": {
"collectCoverageFrom": [
"app/**/*.{js,jsx}",
"!app/**/*.test.{js,jsx}",
"!app/*/RbGenerated*/*.{js,jsx}",
"!app/app.js",
"!app/global-styles.js",
"!app/*/*/Loadable.{js,jsx}"
],
"coverageThreshold": {
"global": {
"statements": 98,
"branches": 91,
"functions": 98,
"lines": 98
}
},
"moduleDirectories": [
"node_modules",
"app"
],
"moduleNameMapper": {
".*\\.(css|less|styl|scss|sass)$": "<rootDir>/config/jest-mocks/cssModule.js",
".*\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/config/jest-mocks/image.js"
},
"setupTestFrameworkScriptFile": "<rootDir>/config/test-setup.js",
"testRegex": "tests/.*\\.test\\.js$"
},
"dependencies": {
"babel-polyfill": "6.23.0",
"chalk": "^1.1.3",
Expand Down

0 comments on commit eaadf50

Please sign in to comment.