🚀 Feature Proposal
When tsconfig.json includes noEmitOnError: true and any compilation error occurs (including tsconfig.json is invalid or the source code has syntax error), ts-jest outputs error message as follows:
Unable to process '/path/to/src/foo.test.mts', please make sure that `outDir` in your tsconfig is neither `''` or `'.'`. You can also configure Jest config option `transformIgnorePatterns` to inform `ts-jest` to transform /path/to/src/foo.test.mts
It is happy that the 'cause' error will be output.
Motivation
When investigating #5196, the above error message is output but was confusing. With Node.js debugging,
|
const output: EmitOutput = this._languageService.getEmitOutput(fileName) |
above EmitOutput has diagnostics with cause errors, so I found the problem.
Example
No response
🚀 Feature Proposal
When tsconfig.json includes
noEmitOnError: trueand any compilation error occurs (including tsconfig.json is invalid or the source code has syntax error), ts-jest outputs error message as follows:It is happy that the 'cause' error will be output.
Motivation
When investigating #5196, the above error message is output but was confusing. With Node.js debugging,
ts-jest/src/legacy/compiler/ts-compiler.ts
Line 211 in e341488
above
EmitOutputhasdiagnosticswith cause errors, so I found the problem.Example
No response