import { sveltekit } from '@sveltejs/kit/vite'; import { configDefaults, defineConfig } from 'vitest/config'; const migrationMemoryTest = 'tests/unit/migration-memory.test.ts'; export default defineConfig({ plugins: [sveltekit()], test: { projects: [ { extends: true, test: { name: 'application', include: ['tests/**/*.{test,spec}.{js,ts}'], exclude: [...configDefaults.exclude, migrationMemoryTest, 'tests/client/**'], sequence: { groupOrder: 0 } } }, { extends: true, resolve: { conditions: ['browser'] }, test: { name: 'client', environment: 'happy-dom', include: ['tests/client/**/*.{test,spec}.{js,ts}'], sequence: { groupOrder: 0 } } }, { extends: true, test: { name: 'migration-memory', include: [migrationMemoryTest], // The 256 MiB rebuild must not contend for disk I/O with other tests. sequence: { groupOrder: 1 } } } ] }, server: { port: 3000 } });