Skip to content

Commit bb806b3

Browse files
authored
fix(testing): force node10 module resolution for jest atomized tasks (#29421)
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
1 parent 77ba049 commit bb806b3

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/jest/src/plugins/plugin.spec.ts

+3
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,9 @@ describe('@nx/jest/plugin', () => {
246246
},
247247
"options": {
248248
"cwd": "proj",
249+
"env": {
250+
"TS_NODE_COMPILER_OPTIONS": "{"moduleResolution":"node10"}",
251+
},
249252
},
250253
"outputs": [
251254
"{workspaceRoot}/coverage",

packages/jest/src/plugins/plugin.ts

+3
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,9 @@ async function buildJestTargets(
407407
outputs,
408408
options: {
409409
cwd: projectRoot,
410+
env: {
411+
TS_NODE_COMPILER_OPTIONS: '{"moduleResolution":"node10"}',
412+
},
410413
},
411414
metadata: {
412415
technologies: ['jest'],

0 commit comments

Comments
 (0)