I have this setup:
// tsconfig.json
{
"compilerOptions": {
"rootDir": "src",
...
}
...
//jest.config.ts
...
globals: {
'ts-jest': {
tsconfig: {
rootDir: '.'
}
}
}
But when I run jest I get an emit error saying that typescript files need to be under root, it seems like this "rootDir" compiler option is being ignored.
I don't want my /test or my configs to be under /src and I don't want it to be compiled to /lib or to be emitted.
I also can't exclude it using exclude
because then it's also excluding the types for my .ts files which are outside the project, which makes using ts-node really difficult.