Skip to content

Commit

Permalink
Moved jest configuration from package.json to jest.config.js
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Coêlho <carlos@vinta.com.br>
  • Loading branch information
chocoelho committed Oct 29, 2018
1 parent eaac6b2 commit 2b30519
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 38 deletions.
33 changes: 33 additions & 0 deletions jest.config.js
Expand Up @@ -5,4 +5,37 @@ module.exports = {
'^.+\\.jsx$': 'babel-jest',
'^.+\\.js$': 'babel-jest',
},
moduleNameMapper: {
'^.+\\.(css|scss)$': 'identity-obj-proxy',
},
transformIgnorePatterns: [
'node_modules/*',
],
modulePaths: [
'assets',
'assets/js',
'assets/js/app',
],
snapshotSerializers: [
'enzyme-to-json/serializer',
],
setupFiles: [
'./jest-setup.js',
],
collectCoverageFrom: [
'assets/js/**/*.{js,jsx}',
],
coveragePathIgnorePatterns: [
'assets/js/store.js',
'assets/js/index.js',
'assets/js/jquery-index.js',
'assets/js/constants/*',
'assets/js/pages/*',
'assets/js/tests/*',
],
coverageThreshold: {
global: {
statements: 10,
},
},
};
38 changes: 0 additions & 38 deletions package.json
Expand Up @@ -12,44 +12,6 @@
"lint": "eslint assets",
"coverage": "jest --coverage"
},
"jest": {
"transform": {
".*": "<rootDir>/node_modules/jest-css-modules"
},
"transformIgnorePatterns": [
"node_modules/*"
],
"modulePaths": [
"assets",
"assets/js",
"assets/js/app"
],
"moduleNameMapper": {
"^.+\\.(css|scss)$": "identity-obj-proxy"
},
"snapshotSerializers": [
"enzyme-to-json/serializer"
],
"setupFiles": [
"./jest-setup.js"
],
"collectCoverageFrom": [
"assets/js/**/*.{js,jsx}"
],
"coveragePathIgnorePatterns": [
"assets/js/store.js",
"assets/js/index.js",
"assets/js/jquery-index.js",
"assets/js/constants/*",
"assets/js/pages/*",
"assets/js/tests/*"
],
"coverageThreshold": {
"global": {
"statements": 10
}
}
},
"dependencies": {
"@babel/cli": "^7.0.0",
"@babel/polyfill": "^7.0.0",
Expand Down

0 comments on commit 2b30519

Please sign in to comment.