1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-28 22:51:59 +00:00

fix: split up vite and vitest config

This commit is contained in:
Daniel Dietzler 2024-12-13 21:09:36 +01:00
parent 7074aaa57f
commit 40888c4900
No known key found for this signature in database
GPG key ID: A1C0B97CD8E18DFF
3 changed files with 16 additions and 10 deletions

View file

@ -13,5 +13,6 @@
"target": "es2022", "target": "es2022",
"types": ["vitest/globals"] "types": ["vitest/globals"]
}, },
"extends": "./.svelte-kit/tsconfig.json" "extends": "./.svelte-kit/tsconfig.json",
"files": ["./vitest.config.js"]
} }

View file

@ -43,13 +43,4 @@ export default defineConfig({
optimizeDeps: { optimizeDeps: {
entries: ['src/**/*.{svelte,ts,html}'], 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
web/vitest.config.js Normal file
View file

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