Repository navigation
fix(tests): drop unused ts-jest transform from shared jest preset - #382
Conversation
nxPreset registers a ts-jest transform, but every project in this workspace overrides it with its own @swc/jest transform, so the entry is resolved by jest at startup yet never executed. ts-jest is not a dependency of any of these projects — it is only pulled in transitively by one example's devDependencies — so any install that does not include that example (e.g. `pnpm install --filter "cdktn-cli..."`) makes every test run fail at config load with "Module ts-jest in the transform option was not found". Override the inherited transform with an empty map; each project supplies its own. Fixes open-constructs#381
|
Verified the reported failure against the PR's merge base ( Reproduction for each revision: corepack pnpm install --filter "cdktn-cli..." --frozen-lockfile --ignore-scripts
corepack pnpm --filter cdktn-cli exec jest --config jest.config.js --showConfig
I also checked every current consumer of the root Configured verification on the PR head also passed:
No correctness, security, or artifact-value findings. The one-line |
|
I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
nxPreset registers a ts-jest transform, but every project in this workspace overrides it with its own @swc/jest transform, so the entry is resolved by jest at startup yet never executed. ts-jest is not a dependency of any of these projects — it is only pulled in transitively by one example's devDependencies — so any install that does not include that example (e.g.
pnpm install --filter "cdktn-cli...") makes every test run fail at config load with "Module ts-jest in the transform option was not found".Override the inherited transform with an empty map; each project supplies its own.
Related issue
Fixes #381
Description
Make the jest.preset.js transform an empty map.
Checklist