import { defineConfig } from 'vitest/config'; import { fileURLToPath } from 'node:url'; // Standalone Vitest config (separate from vite.config.ts so it doesn't pull in the // full SvelteKit plugin). It only needs to resolve the two aliases our pure-logic // modules use: `$lib` and SvelteKit's `$app/environment` virtual module (stubbed). export default defineConfig({ resolve: { alias: { '$app/environment': fileURLToPath(new URL('./src/test/mocks/app-environment.ts', import.meta.url)), $lib: fileURLToPath(new URL('./src/lib', import.meta.url)), }, }, test: { environment: 'node', include: ['src/**/*.test.ts'], }, });