Scope Vitest to src/ only; exclude .agents skill templates, build artifacts, and cvm-server from the test run

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
This commit is contained in:
shakespeare.diy 2026-09-03 21:33:16 +07:00
parent a0673a3244
commit 26245f3d05

View file

@ -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");
},