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
This commit is contained in:
Till-JS 2026-01-29 12:43:19 +01:00
parent 42dafe593b
commit c3dd7703b2
6 changed files with 925 additions and 2 deletions

View file

@ -9,20 +9,26 @@
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"type-check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json"
"type-check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"test": "vitest",
"test:run": "vitest run",
"test:coverage": "vitest run --coverage"
},
"devDependencies": {
"@sveltejs/adapter-node": "^5.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^5.0.0",
"@tailwindcss/vite": "^4.1.7",
"@testing-library/svelte": "^5.2.6",
"@types/node": "^20.0.0",
"jsdom": "^25.0.1",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^4.1.7",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^6.0.0"
"vite": "^6.0.0",
"vitest": "^4.0.18"
},
"dependencies": {
"@manacore/shared-auth": "workspace:*",