diff --git a/e2e/plugin/src/nx-plugin-ts-solution.test.ts b/e2e/plugin/src/nx-plugin-ts-solution.test.ts index 2ec4ad4560..e7b56c0703 100644 --- a/e2e/plugin/src/nx-plugin-ts-solution.test.ts +++ b/e2e/plugin/src/nx-plugin-ts-solution.test.ts @@ -77,6 +77,24 @@ describe('Nx Plugin (TS solution)', () => { expect(runCLI(`e2e @proj/${plugin}-e2e`)).toContain( `Successfully ran target e2e for project @proj/${plugin}-e2e` ); + + // Check that inferred targets also work + updateJson('nx.json', (json) => { + json.plugins.push({ + plugin: '@nx/jest/plugin', + include: ['packages/*-e2e/**/*'], + options: { + targetName: 'e2e', + ciTargetName: 'e2e-ci', + }, + }); + return json; + }); + updateJson(`packages/${plugin}-e2e/package.json`, (json) => { + delete json.targets; + return json; + }); + expect(() => runCLI(`e2e @proj/${plugin}-e2e`)).not.toThrow(); }, 90000); it('should be able to infer projects and targets', async () => { diff --git a/packages/js/src/plugins/jest/start-local-registry.ts b/packages/js/src/plugins/jest/start-local-registry.ts index 22db3534ac..b1605f4ded 100644 --- a/packages/js/src/plugins/jest/start-local-registry.ts +++ b/packages/js/src/plugins/jest/start-local-registry.ts @@ -54,7 +54,7 @@ export function startLocalRegistry({ process.env.npm_config_registry = registry; execSync( - `npm config set //${listenAddress}:${port}/:_authToken "secretVerdaccioToken"`, + `npm config set //${listenAddress}:${port}/:_authToken "secretVerdaccioToken" --ws=false`, { windowsHide: false, } @@ -70,9 +70,12 @@ export function startLocalRegistry({ resolve(() => { childProcess.kill(); - execSync(`npm config delete //${listenAddress}:${port}/:_authToken`, { - windowsHide: false, - }); + execSync( + `npm config delete //${listenAddress}:${port}/:_authToken --ws=false`, + { + windowsHide: false, + } + ); }); childProcess?.stdout?.off('data', listener); }