Skip to content

Commit

Permalink
Merge pull request #432 from zanata/jest-ide
Browse files Browse the repository at this point in the history
externalize jest config so that tests can be run in IDE
  • Loading branch information
Patrick Huang committed Jul 21, 2017
2 parents 07c22bb + b718b7e commit 43a8972
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 33 deletions.
31 changes: 31 additions & 0 deletions server/zanata-frontend/src/frontend/jest.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"collectCoverageFrom": [
"app/**/*.{js,jsx}",
"!**/node_modules/**",
"!app/**/*.story.js"
],
"coverageReporters": [
"cobertura",
"html",
"lcov",
"text"
],
"moduleNameMapper": {
"^.+\\.(css)$": "./__tests__/mock/mockCss.js"
},
"transform": {
".*": "./node_modules/babel-jest"
},
"testPathIgnorePatterns": [
"/node_modules/",
"/__tests__/mock"
],
"unmockedModulePathPatterns": [
"/node_modules",
"/app"
],
"moduleFileExtensions": [
"js",
"jsx"
]
}
35 changes: 2 additions & 33 deletions server/zanata-frontend/src/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"storybook-editor": "start-storybook -p 9001 -s ./dist --config-dir .storybook-editor",
"storybook-frontend": "start-storybook -p 9001 -s ./dist --config-dir .storybook-frontend",
"storybook-build": "build-storybook -s ./dist",
"test": "jest --coverage",
"test:watch": "jest --watch --coverage"
"test": "jest --coverage --config jest.config.json",
"test:watch": "jest --watch --coverage --config jest.config.json"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -133,36 +133,5 @@
"svg-sprite": "1.3.6",
"text-diff": "1.0.1",
"webfontloader": "1.6.24"
},
"jest": {
"collectCoverageFrom": [
"app/**/*.{js,jsx}",
"!**/node_modules/**",
"!app/**/*.story.js"
],
"coverageReporters": [
"cobertura",
"html",
"lcov",
"text"
],
"moduleNameMapper": {
"^.+\\.(css)$": "./__tests__/mock/mockCss.js"
},
"transform": {
".*": "./node_modules/babel-jest"
},
"testPathIgnorePatterns": [
"/node_modules/",
"/__tests__/mock"
],
"unmockedModulePathPatterns": [
"/node_modules",
"/app"
],
"moduleFileExtensions": [
"js",
"jsx"
]
}
}

0 comments on commit 43a8972

Please sign in to comment.