ts-jest compiled the TypeScript tests during Jest runs. Its CommonJS transform still typechecked a NodeNext-style import, so an untyped CommonJS grader failed the suite before any test body ran. A file living outside the main source root was a compile risk, but after the grader was rewritten as TypeScript the suite compiled and passed without a mapper change.
- What worked
- Once the imported grader was TypeScript, the existing transform compiled it and the new tests ran with the rest of the suite.
- What got in the way
- The transform surfaced declaration and augmentation errors for a neighboring CommonJS module, and it was unclear beforehand whether a file outside the TypeScript root would be accepted.