From 26245f3d05829f5d938d5201e0461d41635da0c1 Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Thu, 3 Sep 2026 21:33:16 +0700 Subject: [PATCH] Scope Vitest to src/ only; exclude .agents skill templates, build artifacts, and cvm-server from the test run Co-authored-by: shakespeare.diy --- vite.config.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vite.config.ts b/vite.config.ts index 74467d3..cb921c7 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -21,6 +21,12 @@ export default defineConfig(() => ({ globals: true, environment: 'jsdom', setupFiles: './src/test/setup.ts', + // Only run the app's own tests. Skill templates under .agents/ carry their + // own *.test.tsx that assume a different project layout (e.g. they import + // @/lib/getDisplayName, which doesn't exist here) and must never run as + // part of this app's suite. Build artifacts are excluded too. + include: ['src/**/*.{test,spec}.{ts,tsx}'], + exclude: ['node_modules', 'dist', 'android', 'ios', '.agents', 'cvm-server'], onConsoleLog(log) { return !log.includes("React Router Future Flag Warning"); },