Add Vitest, jsdom and importer tests

Set up testing with Vitest and jsdom and add unit tests for importers (jellyfin, playnite, stashapp, xbvr). Add typedoc configuration and update vite.config.ts and importer source files to support the tests. Ignore generated docs by adding /docs to .gitignore and add test-related devDependencies (vitest, @vitest/ui, jsdom, typedoc) in package.json.
This commit is contained in:
Lars Behrends
2026-04-16 15:09:06 +02:00
parent 432416cfc5
commit 63c5d0a7c0
13 changed files with 3336 additions and 13 deletions

View File

@@ -8,7 +8,12 @@
"build": "vite build",
"preview": "vite preview",
"clean": "rm -rf dist",
"lint": "tsc --noEmit"
"lint": "tsc --noEmit",
"test": "vitest",
"test:ui": "vitest --ui",
"test:run": "vitest run",
"docs": "typedoc",
"docs:serve": "typedoc && npx serve docs"
},
"dependencies": {
"@base-ui/react": "^1.3.0",
@@ -34,10 +39,14 @@
"devDependencies": {
"@types/express": "^4.17.21",
"@types/node": "^22.14.0",
"@vitest/ui": "^4.1.4",
"autoprefixer": "^10.4.21",
"jsdom": "^29.0.2",
"tailwindcss": "^4.1.14",
"tsx": "^4.21.0",
"typedoc": "^0.28.19",
"typescript": "~5.8.2",
"vite": "^6.2.0"
"vite": "^6.2.0",
"vitest": "^4.1.4"
}
}