create default jest config

This commit is contained in:
Daniel Ternyak 2017-04-12 00:01:02 -05:00
parent 41b219a853
commit dcba1c00ea
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,15 @@
{
"moduleFileExtensions": ["js", "jsx"],
"testPathIgnorePatterns": ["<rootDir>/common/config"],
"setupFiles": ["<rootDir>/jest_config/setupJest.js"],
"automock": false,
"moduleNameMapper": {
"^actions$": "<rootDir>/common/actions",
"^api": "<rootDir>/common/api",
"^reducers$": "<rootDir>/common/reducers",
"^routing": "<rootDir>/common/routing",
"^components$": "<rootDir>/common/components",
"^containers$": "<rootDir>/common/containers",
"^config$": "<rootDir>/common/config/test.js"
}
}

2
jest_config/setupJest.js Normal file
View File

@ -0,0 +1,2 @@
global.fetch = require('node-fetch')
window.BASE_API = 'http://localhost:4000/api/v1'