From 6b73b9253bba2e060903b9dc9d81bb165f7f4cc5 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Fri, 30 Oct 2026 00:04:04 +0100 Subject: [PATCH] fix: stop test runs from reloading the page under next dev --- vitest.config.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vitest.config.ts b/vitest.config.ts index 95a484920..1d0dd83b5 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,5 +1,6 @@ import { defineConfig } from 'vitest/config'; import react from '@vitejs/plugin-react'; +import os from 'os'; import path from 'path'; export default defineConfig({ @@ -15,6 +16,10 @@ export default defineConfig({ // get collected too. // scripts/lite/smoke/** is the Playwright smoke for the static Lite export. exclude: ['integration/**', 'examples/**', 'repos/**', '**/node_modules/**', '.next/**', 'out/**', 'scripts/lite/smoke/**', 'scripts/perf-guard/**', 'scripts/a11y-guard/**'], + // The default node_modules/.vitest-cache sits inside the tree Turbopack + // watches, so every test run made a running `next dev` rebuild and reload + // the open page about once a second. + fsModuleCachePath: path.join(os.tmpdir(), 'bulwark-vitest-cache'), }, resolve: { alias: {