For those who are facing this issue in 2022. Please add this code in your
`jest-unit.json (or your jest config json file)`.
"moduleDirectories": ["<rootDir>/../", "node_modules"]
Result:
{
"moduleFileExtensions": ["js", "json", "ts"],
"rootDir": ".",
"testEnvironment": "node",
"testRegex": "..spec.ts$",
"transform": {
"^.+.(t|j)s$": "ts-jest"
},
"moduleDirectories": ["<rootDir>/../", "node_modules"]
}