Is this normal in ts-jest or am I missing some extra configuration
You should set roots to /src only. Here is a good config:
module.exports = {
"roots": [
"<rootDir>/src"
],
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
"moduleFileExtensions": [
"ts",
"tsx",
"json"
],
}
I also only test .tsx? files (no .jsx?) 😉