From 40888c49006687b0b8da733a2585c54b939ca501 Mon Sep 17 00:00:00 2001 From: Daniel Dietzler Date: Fri, 13 Dec 2024 21:09:36 +0100 Subject: [PATCH] fix: split up vite and vitest config --- web/tsconfig.json | 3 ++- web/vite.config.js | 9 --------- web/vitest.config.js | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 web/vitest.config.js 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', + }, + }, +});