Skip to content

Commit f3013cc

Browse files
authored
fix(testing): do not inherit existing env (#30688)
<!-- 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 --> Inheriting the existing environment variable here causes tests to fail for some reason. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> This reverts it to how it functioned before and fixes the failing tests. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
1 parent f839b07 commit f3013cc

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

nx.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@
245245
"nxCloudId": "62d013ea0852fe0a2df74438",
246246
"nxCloudUrl": "https://staging.nx.app",
247247
"parallel": 1,
248-
"bust": 6,
248+
"bust": 7,
249249
"defaultBase": "master",
250250
"conformance": {
251251
"rules": [

packages/jest/src/plugins/plugin.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,7 @@ async function buildJestTargets(
253253
const targets: Record<string, TargetConfiguration> = {};
254254
const namedInputs = getNamedInputs(projectRoot, context);
255255

256-
const existingTsNodeCompilerOptions = process.env['TS_NODE_COMPILER_OPTIONS'];
257256
const tsNodeCompilerOptions = JSON.stringify({
258-
...(existingTsNodeCompilerOptions
259-
? JSON.parse(existingTsNodeCompilerOptions)
260-
: {}),
261257
moduleResolution: 'node10',
262258
module: 'commonjs',
263259
customConditions: null,

0 commit comments

Comments
 (0)