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
26 lines
903 B
TypeScript
26 lines
903 B
TypeScript
/// <reference types="vitest/config" />
|
|
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
test: {
|
|
environment: 'jsdom',
|
|
globals: true,
|
|
setupFiles: ['./src/test/setup.ts'],
|
|
exclude: [
|
|
'**/node_modules/**',
|
|
'**/dist/**',
|
|
'**/cypress/**',
|
|
'**/.{idea,git,cache,output,temp}/**',
|
|
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
|
|
'**/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/**',
|
|
],
|
|
},
|
|
})
|