This is my jest.config.json
{
"moduleFileExtensions": ["js", "json", "ts"],
"rootDir": ".",
"testEnvironment": "node",
"testRegex": ".e2e-spec.ts$",
"moduleNameMapper": {
"^~/(.*)": "<rootDir>/src/$1"
},
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
}
}
When i run tests jest throws error: ` Configuration error:
Could not locate module ~/users/user.entity mapped as:
C:\Users\makow\Documents\Projects\rigtch-music-api\test\src\$1.
Please check your configuration for these entries:
{
"moduleNameMapper": {
"/^~\/(.*)/": "C:\Users\makow\Documents\Projects\rigtch-music-api\test\src\$1"
},
"resolver": undefined
}
`
How can I setup path aliases for jest