Skip to content

Commit

Permalink
fix: split up vite and vitest config
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldietzler committed Dec 13, 2024
1 parent 7074aaa commit 40888c4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
3 changes: 2 additions & 1 deletion web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"target": "es2022",
"types": ["vitest/globals"]
},
"extends": "./.svelte-kit/tsconfig.json"
"extends": "./.svelte-kit/tsconfig.json",
"files": ["./vitest.config.js"]
}
9 changes: 0 additions & 9 deletions web/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
},
});
14 changes: 14 additions & 0 deletions web/vitest.config.js
Original file line number Diff line number Diff line change
@@ -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',
},
},
});

0 comments on commit 40888c4

Please sign in to comment.