From b4f7c1dce30d1e6fedeb81ff416a7734dcc5bcaa Mon Sep 17 00:00:00 2001 From: belviskhoremk Date: Wed, 12 Aug 2026 10:19:15 +0200 Subject: [PATCH] fix: exclude nested worktree directories from vitest Running the suite from the main checkout was picking up each worktree's full copy of src/ under .claude/worktrees/, silently running every test twice. The existing supabase/functions/** exclude only matched at repo root, so it also missed the nested worktree's copy of that path. Claude-Session: https://claude.ai/code/session_01NhxA4npAXAxmCDEJt6kxSH --- vite.config.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index 5bc4af7..56212c8 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -14,7 +14,12 @@ export default defineConfig({ '**/cypress/**', '**/.{idea,git,cache,output,temp}/**', '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*', - 'supabase/functions/**', + '**/supabase/functions/**', + // Git worktrees for in-progress branches live nested under .claude/worktrees/ + // in this project's dev setup — without this, running vitest from the main + // checkout also picks up each worktree's full copy of src/, duplicating + // every test (and, for worktrees mid-migration, potentially failing ones). + '**/.claude/worktrees/**', ], }, })