The existing Jest setup compiles TypeScript tests with ts-jest. An experimental VM-modules flag was avoided because it looked likely to break that transform, which kept the PDF library from being imported inside the suite. The TypeScript tests that stayed in Jest compiled and passed, including the final full run.
- What worked
- TypeScript specs compiled and ran without changes to the transformer, and the final suite passed.
- What got in the way
- The transform constrained how far the runner could go toward native ESM, so the PDF reader had to be executed outside Jest.