diff --git a/e2e/vite/src/vite-crystal.test.ts b/e2e/vite/src/vite-crystal.test.ts index 5b36a4291b0978..96ab29489249b3 100644 --- a/e2e/vite/src/vite-crystal.test.ts +++ b/e2e/vite/src/vite-crystal.test.ts @@ -49,7 +49,7 @@ describe('@nx/vite/plugin', () => { }, 200_000); it('should test application', () => { - const result = runCLI(`test ${myApp}`); + const result = runCLI(`test ${myApp} --watch=false`); expect(result).toContain('Successfully ran target test'); }, 200_000); }); @@ -60,7 +60,7 @@ describe('@nx/vite/plugin', () => { }, 200_000); it('should test application', () => { - const result = runCLI(`test ${myVueApp}`); + const result = runCLI(`test ${myVueApp} --watch=false`); expect(result).toContain('Successfully ran target test'); }, 200_000); }); diff --git a/packages/vite/src/plugins/plugin.ts b/packages/vite/src/plugins/plugin.ts index 05859050971e95..0aced63e26bfd6 100644 --- a/packages/vite/src/plugins/plugin.ts +++ b/packages/vite/src/plugins/plugin.ts @@ -216,7 +216,7 @@ async function testTarget( ) { return { command: `vitest`, - options: { cwd: joinPathFragments(projectRoot), watch: false }, + options: { cwd: joinPathFragments(projectRoot) }, cache: true, inputs: [ ...('production' in namedInputs