Skip to content

Commit

Permalink
chore: extract jest config (#863)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvet authored Mar 20, 2018
1 parent ade7a23 commit 986761b
Show file tree
Hide file tree
Showing 16 changed files with 80 additions and 64 deletions.
7 changes: 7 additions & 0 deletions packages/dx-react-core/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const path = require('path');

module.exports = {
setupFiles: [
path.join(__dirname, './setup-enzyme.js'),
],
};
5 changes: 0 additions & 5 deletions packages/dx-react-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@
"lint": "eslint \"src/**\"",
"lint:fix": "yarn run lint -- --fix"
},
"jest": {
"setupFiles": [
"<rootDir>/setup-enzyme.js"
]
},
"devDependencies": {
"@devexpress/dx-testing": "1.1.0",
"babel-core": "^6.26.0",
Expand Down
25 changes: 25 additions & 0 deletions packages/dx-react-demos/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const path = require('path');

module.exports = {
transform: {
'^.+\\.jsx?$': 'babel-jest',
'^.+\\.tsx?$': 'ts-jest',
},
moduleNameMapper: {
'\\.css$': path.join(__dirname, './css-stub.js'),
},
moduleFileExtensions: [
'js',
'json',
'jsx',
'node',
'ts',
'tsx',
],
testMatch: [
'**/*.test.(ts|tsx|js|jsx)',
],
setupFiles: [
path.join(__dirname, './setup-enzyme.js'),
],
};
23 changes: 0 additions & 23 deletions packages/dx-react-demos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,6 @@
"lint": "eslint \"src/**/*.{js,jsx}\"",
"lint:fix": "yarn run lint -- --fix"
},
"jest": {
"transform": {
"^.+\\.jsx?$": "babel-jest",
"^.+\\.tsx?$": "ts-jest"
},
"moduleNameMapper": {
"\\.css$": "<rootDir>/css-stub.js"
},
"moduleFileExtensions": [
"js",
"json",
"jsx",
"node",
"ts",
"tsx"
],
"setupFiles": [
"<rootDir>/setup-enzyme.js"
],
"testMatch": [
"**/*.test.(ts|tsx|js|jsx)"
]
},
"dependencies": {
"@devexpress/dx-demo-shell": "1.1.0",
"@devexpress/dx-react-core": "1.1.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/dx-react-grid-bootstrap3/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const path = require('path');

module.exports = {
setupFiles: [
path.join(__dirname, './setup-enzyme.js'),
],
};
5 changes: 0 additions & 5 deletions packages/dx-react-grid-bootstrap3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@
"lint": "eslint \"src/**\"",
"lint:fix": "yarn run lint -- --fix"
},
"jest": {
"setupFiles": [
"<rootDir>/setup-enzyme.js"
]
},
"devDependencies": {
"@devexpress/dx-grid-core": "1.1.0",
"@devexpress/dx-react-core": "1.1.0",
Expand Down
10 changes: 10 additions & 0 deletions packages/dx-react-grid-bootstrap4/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const path = require('path');

module.exports = {
moduleNameMapper: {
'.css$': path.join(__dirname, './css-stub.js'),
},
setupFiles: [
path.join(__dirname, './setup-enzyme.js'),
],
};
8 changes: 0 additions & 8 deletions packages/dx-react-grid-bootstrap4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@
"lint": "eslint \"src/**\"",
"lint:fix": "yarn run lint -- --fix"
},
"jest": {
"moduleNameMapper": {
"\\.css$": "<rootDir>/css-stub.js"
},
"setupFiles": [
"<rootDir>/setup-enzyme.js"
]
},
"devDependencies": {
"@devexpress/dx-grid-core": "1.1.0",
"@devexpress/dx-react-core": "1.1.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/dx-react-grid-material-ui/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const path = require('path');

module.exports = {
setupFiles: [
path.join(__dirname, './setup-enzyme.js'),
],
};
5 changes: 0 additions & 5 deletions packages/dx-react-grid-material-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@
"lint": "eslint \"src/**\"",
"lint:fix": "yarn run lint -- --fix"
},
"jest": {
"setupFiles": [
"<rootDir>/setup-enzyme.js"
]
},
"devDependencies": {
"@devexpress/dx-grid-core": "1.1.0",
"@devexpress/dx-react-core": "1.1.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/dx-react-grid/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const path = require('path');

module.exports = {
setupFiles: [
path.join(__dirname, './setup-enzyme.js'),
],
};
5 changes: 0 additions & 5 deletions packages/dx-react-grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@
"lint": "eslint \"src/**\"",
"lint:fix": "yarn run lint -- --fix"
},
"jest": {
"setupFiles": [
"<rootDir>/setup-enzyme.js"
]
},
"devDependencies": {
"@devexpress/dx-core": "1.1.0",
"@devexpress/dx-react-core": "1.1.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/dx-vue-core/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const path = require('path');

module.exports = {
setupFiles: [
path.join(__dirname, './setup-vue.js'),
],
};
5 changes: 0 additions & 5 deletions packages/dx-vue-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
"lint": "eslint \"src/**\"",
"lint:fix": "yarn run lint -- --fix"
},
"jest": {
"setupFiles": [
"<rootDir>/setup-vue.js"
]
},
"devDependencies": {
"@devexpress/dx-testing": "1.1.0",
"@vue/test-utils": "^1.0.0-beta.12",
Expand Down
10 changes: 10 additions & 0 deletions packages/dx-vue-demos/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const path = require('path');

module.exports = {
moduleNameMapper: {
'\\.css$': path.join(__dirname, './css-stub.js'),
},
setupFiles: [
path.join(__dirname, './setup-vue.js'),
],
};
8 changes: 0 additions & 8 deletions packages/dx-vue-demos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@
"lint": "eslint \"src/**/*.{js,jsx}\"",
"lint:fix": "yarn run lint -- --fix"
},
"jest": {
"moduleNameMapper": {
"\\.css$": "<rootDir>/css-stub.js"
},
"setupFiles": [
"<rootDir>/setup-vue.js"
]
},
"dependencies": {
"@devexpress/dx-demo-shell": "1.1.0",
"@devexpress/dx-vue-core": "1.1.0",
Expand Down

0 comments on commit 986761b

Please sign in to comment.