diff --git a/web/tsconfig.json b/web/tsconfig.json index 31aef23e31..72e253682b 100644 --- a/web/tsconfig.json +++ b/web/tsconfig.json @@ -13,5 +13,6 @@ "target": "es2022", "types": ["vitest/globals"] }, - "extends": "./.svelte-kit/tsconfig.json" + "extends": "./.svelte-kit/tsconfig.json", + "files": ["./vitest.config.js"] } diff --git a/web/vite.config.js b/web/vite.config.js index 266312e137..89cfddfeda 100644 --- a/web/vite.config.js +++ b/web/vite.config.js @@ -43,13 +43,4 @@ export default defineConfig({ optimizeDeps: { entries: ['src/**/*.{svelte,ts,html}'], }, - test: { - include: ['src/**/*.{test,spec}.{js,ts}'], - globals: true, - environment: 'jsdom', - setupFiles: ['./src/test-data/setup.ts'], - sequence: { - hooks: 'list', - }, - }, }); diff --git a/web/vitest.config.js b/web/vitest.config.js new file mode 100644 index 0000000000..80e97f3310 --- /dev/null +++ b/web/vitest.config.js @@ -0,0 +1,14 @@ +import { mergeConfig } from 'vitest/config'; +import viteConfig from './vite.config'; + +export default mergeConfig(viteConfig, { + test: { + include: ['src/**/*.{test,spec}.{js,ts}'], + globals: true, + environment: 'jsdom', + setupFiles: ['./src/test-data/setup.ts'], + sequence: { + hooks: 'list', + }, + }, +});