diff --git a/packages/nuxt/src/generators/application/__snapshots__/application.spec.ts.snap b/packages/nuxt/src/generators/application/__snapshots__/application.spec.ts.snap index ed0f67a268cc6..1f36884ebcac6 100644 --- a/packages/nuxt/src/generators/application/__snapshots__/application.spec.ts.snap +++ b/packages/nuxt/src/generators/application/__snapshots__/application.spec.ts.snap @@ -104,6 +104,7 @@ export default defineConfig({ // }, test: { + watch: false, globals: true, cache: { dir: '../node_modules/.vitest/my-app', diff --git a/packages/react/src/generators/library/__snapshots__/library.spec.ts.snap b/packages/react/src/generators/library/__snapshots__/library.spec.ts.snap index 29acf6f9c152d..c142af2e5009d 100644 --- a/packages/react/src/generators/library/__snapshots__/library.spec.ts.snap +++ b/packages/react/src/generators/library/__snapshots__/library.spec.ts.snap @@ -23,7 +23,8 @@ nxViteTsPaths(), test: { - 'globals': true, + 'watch': false, +'globals': true, 'cache': {"dir":"../node_modules/.vitest/my-lib"}, 'environment': "jsdom", 'include': ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], @@ -83,6 +84,7 @@ dts({ entryRoot: 'src', tsconfigPath: path.join(__dirname, 'tsconfig.lib.json') }, test: { + watch: false, globals: true, cache: { dir: '../node_modules/.vitest/my-lib' diff --git a/packages/remix/src/generators/application/__snapshots__/application.impl.spec.ts.snap b/packages/remix/src/generators/application/__snapshots__/application.impl.spec.ts.snap index 0b0daaa448bc5..74a29d92f1fe1 100644 --- a/packages/remix/src/generators/application/__snapshots__/application.impl.spec.ts.snap +++ b/packages/remix/src/generators/application/__snapshots__/application.impl.spec.ts.snap @@ -384,6 +384,7 @@ export default defineConfig({ test: { setupFiles: ['test-setup.ts'], + watch: false, globals: true, cache: { dir: '../node_modules/.vitest/test', @@ -897,6 +898,7 @@ export default defineConfig({ test: { setupFiles: ['test-setup.ts'], + watch: false, globals: true, cache: { dir: '../../node_modules/.vitest/apps/test', @@ -1217,6 +1219,7 @@ export default defineConfig({ test: { setupFiles: ['test-setup.ts'], + watch: false, globals: true, cache: { dir: './node_modules/.vitest/test', diff --git a/packages/remix/src/generators/library/__snapshots__/library.impl.spec.ts.snap b/packages/remix/src/generators/library/__snapshots__/library.impl.spec.ts.snap index 855fe8b641970..8f0e5f17c1269 100644 --- a/packages/remix/src/generators/library/__snapshots__/library.impl.spec.ts.snap +++ b/packages/remix/src/generators/library/__snapshots__/library.impl.spec.ts.snap @@ -41,6 +41,7 @@ export default defineConfig({ test: { setupFiles: ['./src/test-setup.ts'], + watch: false, globals: true, cache: { dir: '../node_modules/.vitest/test' }, environment: 'jsdom', @@ -119,6 +120,7 @@ export default defineConfig({ test: { setupFiles: ['./src/test-setup.ts'], + watch: false, globals: true, cache: { dir: '../../node_modules/.vitest/libs/test' }, environment: 'jsdom', diff --git a/packages/remix/src/generators/storybook-configuration/__snapshots__/storybook-configuration.impl.spec.ts.snap b/packages/remix/src/generators/storybook-configuration/__snapshots__/storybook-configuration.impl.spec.ts.snap index cfbd6f2bda4d1..155079d9f646d 100644 --- a/packages/remix/src/generators/storybook-configuration/__snapshots__/storybook-configuration.impl.spec.ts.snap +++ b/packages/remix/src/generators/storybook-configuration/__snapshots__/storybook-configuration.impl.spec.ts.snap @@ -104,6 +104,7 @@ export default defineConfig({ test: { setupFiles: ['./src/test-setup.ts'], + watch: false, globals: true, cache: { dir: '../../node_modules/.vitest/libs/storybook-test' }, environment: 'jsdom', diff --git a/packages/vite/src/generators/configuration/__snapshots__/configuration.spec.ts.snap b/packages/vite/src/generators/configuration/__snapshots__/configuration.spec.ts.snap index de995b56caee1..36399c01ba09f 100644 --- a/packages/vite/src/generators/configuration/__snapshots__/configuration.spec.ts.snap +++ b/packages/vite/src/generators/configuration/__snapshots__/configuration.spec.ts.snap @@ -49,6 +49,7 @@ export default defineConfig({ }, test: { + watch: false, globals: true, cache: { dir: '../node_modules/.vitest/my-lib', @@ -267,6 +268,7 @@ export default defineConfig({ }, test: { + watch: false, globals: true, cache: { dir: '../../node_modules/.vitest/libs/react-lib-nonb-jest', @@ -493,6 +495,7 @@ export default defineConfig({ }, test: { + watch: false, globals: true, cache: { dir: '../../node_modules/.vitest/apps/my-test-react-app', diff --git a/packages/vite/src/generators/vitest/__snapshots__/vitest.spec.ts.snap b/packages/vite/src/generators/vitest/__snapshots__/vitest.spec.ts.snap index 73d88591c02ef..1c9dcf9857ba1 100644 --- a/packages/vite/src/generators/vitest/__snapshots__/vitest.spec.ts.snap +++ b/packages/vite/src/generators/vitest/__snapshots__/vitest.spec.ts.snap @@ -21,6 +21,7 @@ export default defineConfig({ 'import.meta.vitest': undefined, }, test: { + watch: false, globals: true, cache: { dir: '../../node_modules/.vitest/apps/my-test-react-app', @@ -61,6 +62,7 @@ export default defineConfig({ // }, test: { + watch: false, globals: true, cache: { dir: '../../node_modules/.vitest/apps/my-test-react-app', @@ -96,6 +98,7 @@ export default defineConfig({ // }, test: { + watch: false, globals: true, cache: { dir: '../../node_modules/.vitest/libs/react-lib-nonb-jest', diff --git a/packages/vite/src/utils/generator-utils.ts b/packages/vite/src/utils/generator-utils.ts index 7e8df63cfd7c9..a6ebcb1d8fb75 100644 --- a/packages/vite/src/utils/generator-utils.ts +++ b/packages/vite/src/utils/generator-utils.ts @@ -432,6 +432,7 @@ export function createOrEditViteConfig( const testOption = options.includeVitest ? `test: { + watch: false, globals: true, cache: { dir: '${normalizedJoinPaths( diff --git a/packages/vue/src/generators/application/__snapshots__/application.spec.ts.snap b/packages/vue/src/generators/application/__snapshots__/application.spec.ts.snap index c7fd41a8ae384..6c84238a269db 100644 --- a/packages/vue/src/generators/application/__snapshots__/application.spec.ts.snap +++ b/packages/vue/src/generators/application/__snapshots__/application.spec.ts.snap @@ -76,6 +76,7 @@ export default defineConfig({ }, test: { + watch: false, globals: true, cache: { dir: '../node_modules/.vitest/test', diff --git a/packages/vue/src/generators/library/__snapshots__/library.spec.ts.snap b/packages/vue/src/generators/library/__snapshots__/library.spec.ts.snap index 54e01b9445780..d617136f3d53e 100644 --- a/packages/vue/src/generators/library/__snapshots__/library.spec.ts.snap +++ b/packages/vue/src/generators/library/__snapshots__/library.spec.ts.snap @@ -51,6 +51,7 @@ export default defineConfig({ }, test: { + watch: false, globals: true, cache: { dir: '../node_modules/.vitest/my-lib', @@ -147,6 +148,7 @@ export default defineConfig({ }, test: { + watch: false, globals: true, cache: { dir: '../node_modules/.vitest/my-lib', diff --git a/packages/workspace/src/generators/preset/__snapshots__/preset.spec.ts.snap b/packages/workspace/src/generators/preset/__snapshots__/preset.spec.ts.snap index cdf7cf047b2e3..23c3bac22b1f3 100644 --- a/packages/workspace/src/generators/preset/__snapshots__/preset.spec.ts.snap +++ b/packages/workspace/src/generators/preset/__snapshots__/preset.spec.ts.snap @@ -106,6 +106,7 @@ export default defineConfig({ }, test: { + watch: false, globals: true, cache: { dir: './node_modules/.vitest/proj', @@ -194,6 +195,7 @@ export default defineConfig({ }, test: { + watch: false, globals: true, cache: { dir: '../../node_modules/.vitest/apps/proj', @@ -248,6 +250,7 @@ export default defineConfig({ }, test: { + watch: false, globals: true, cache: { dir: './node_modules/.vitest/proj',