Skip to content

Commit

Permalink
Fix/unit tests code coverage (#8262)
Browse files Browse the repository at this point in the history
* Tests: Fix setup for code coverage ignore patterns

* Tests: Update path for babel-jest transform

* Tests: Add ignore patterns for the project
  • Loading branch information
gziolo authored Jul 29, 2018
1 parent a975273 commit cbae73c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/jest-preset-default/jest-preset.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"coveragePathIgnorePatterns": [
"/node_modules/",
"<rootDir>/.*/build/",
"<rootDir>/.*/build-module/"
"<rootDir>/.*/build-module/",
"<rootDir>/.*/test/"
],
"moduleNameMapper": {
"\\.(scss|css)$": "<rootDir>/node_modules/@wordpress/jest-preset-default/scripts/style-mock.js"
Expand All @@ -22,7 +23,7 @@
],
"timers": "fake",
"transform": {
"^.+\\.jsx?$": "babel-jest"
"^.+\\.jsx?$": "<rootDir>/node_modules/babel-jest"
},
"verbose": true
}
3 changes: 2 additions & 1 deletion test/unit/jest.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"/node_modules/",
"<rootDir>/.*/build/",
"<rootDir>/.*/build-module/",
"<rootDir>/packages/.*/benchmark/"
"<rootDir>/packages/.*/benchmark/",
"<rootDir>/packages/.*/test/"
],
"moduleNameMapper": {
"@wordpress\\/(components|edit-post|core-blocks)$": "$1",
Expand Down

0 comments on commit cbae73c

Please sign in to comment.