managarten/apps/skilltree/apps/web/vitest.config.ts
Till-JS c3dd7703b2 test(skilltree): add comprehensive test suite for web and backend
Add 91 tests covering the SkillTree application:

Web (Vitest - 53 tests):
- Level calculation and XP progress functions
- Branch validation and factory functions
- createDefaultSkill and createActivity helpers

Backend (Jest - 38 tests):
- SkillService CRUD operations
- XP system with level-up detection
- User stats aggregation
- Custom Drizzle ORM mock with thenable query builder
2026-01-29 12:43:19 +01:00

18 lines
419 B
TypeScript

import { defineConfig } from 'vitest/config';
import { svelte } from '@sveltejs/vite-plugin-svelte';
import { resolve } from 'path';
export default defineConfig({
plugins: [svelte({ hot: !process.env.VITEST })],
test: {
include: ['src/**/*.{test,spec}.{js,ts}'],
globals: true,
environment: 'jsdom',
setupFiles: ['./src/test/setup.ts'],
},
resolve: {
alias: {
$lib: resolve('./src/lib'),
},
},
});