fix tests, upgrade jest
Summary: Adding a `moduleNameMapper` for jest tests, to map the module `flipper` to `src/index.js`. This fixes the electron tests. While we're at it, upgrading jest and jest-runner/electron to the latest versions. Reviewed By: jknoxville Differential Revision: D14870486 fbshipit-source-id: c4c31066ed5ce8a6d5ed4e7e4f47d3c5d2370553
This commit is contained in:
committed by
Facebook Github Bot
parent
a27cd84d45
commit
efd9b37428
11
package.json
11
package.json
@@ -40,14 +40,17 @@
|
|||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"transform": {
|
"transform": {
|
||||||
"\\.(js)$": "<rootDir>/static/transforms/index.js"
|
"\\.js$": "<rootDir>/static/transforms/index.js"
|
||||||
},
|
},
|
||||||
"setupFiles": [
|
"setupFiles": [
|
||||||
"<rootDir>/static/globalTestSetup.js"
|
"<rootDir>/static/globalTestSetup.js"
|
||||||
]
|
],
|
||||||
|
"moduleNameMapper": {
|
||||||
|
"^flipper$": "<rootDir>/src/index.js"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@jest-runner/electron": "^1.0.3",
|
"@jest-runner/electron": "^1.1.1",
|
||||||
"babel-eslint": "^10.0.1",
|
"babel-eslint": "^10.0.1",
|
||||||
"electron": "^4.0.8",
|
"electron": "^4.0.8",
|
||||||
"electron-builder": "^20.38.5",
|
"electron-builder": "^20.38.5",
|
||||||
@@ -62,7 +65,7 @@
|
|||||||
"eslint-plugin-relay": "^1.0.0",
|
"eslint-plugin-relay": "^1.0.0",
|
||||||
"flow-bin": "^0.91.0",
|
"flow-bin": "^0.91.0",
|
||||||
"glob": "^7.1.2",
|
"glob": "^7.1.2",
|
||||||
"jest": "^24.7.0",
|
"jest": "^24.7.1",
|
||||||
"jest-fetch-mock": "^2.1.0",
|
"jest-fetch-mock": "^2.1.0",
|
||||||
"prettier": "1.16.4",
|
"prettier": "1.16.4",
|
||||||
"redux-mock-store": "^1.5.3"
|
"redux-mock-store": "^1.5.3"
|
||||||
|
|||||||
Reference in New Issue
Block a user