Receiving the following error when running Jest
Cannot find module '@cp-module/login/loginConstant' from 'src/module/login/loginAction.js'
loginAction.js
import * as CONST from '@cp-module/login/loginConstant';
I think because jest can't read config jsconfig.json :
{
"compilerOptions": {
"baseUrl": ".",
"jsx": "react",
"paths": {
"@cp-asset/*": ["./src/assets/*"],
"@cp-bootstrap/*": ["./src/bootstrap/*"],
"@cp-component": ["src/component/index"],
"@cp-config/*": ["src/config/*"],
"@cp-module/*": ["src/module/*"],
"@cp-module-auth*": ["./src/module/auth/*"],
"@cp-style/*": ["./src/style/*"],
"@cp-util/*": ["./src/util/*"]
},
"allowSyntheticDefaultImports": true
},
"exclude": ["node_modules"]
}
I'm looking for how to configure Jest to not fail read with paths from jsconfig.json