Initial Upload
Some checks failed
CI / Lint & Typecheck (push) Has been cancelled
CI / Test (routes) (push) Has been cancelled
CI / Test (security) (push) Has been cancelled
CI / Test (services) (push) Has been cancelled
CI / Test (unit) (push) Has been cancelled
CI / Test (integration) (push) Has been cancelled
CI / Test Coverage (push) Has been cancelled
CI / Build (push) Has been cancelled

This commit is contained in:
2025-12-17 12:32:50 +13:00
commit 3015f48118
471 changed files with 141143 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
/**
* Unit Tests Configuration
*
* Fast, isolated tests for pure functions:
* - utils/* (crypto, jwt, password, parsing, http, errors)
* - schemas (Zod validation)
* - mediaServer parsers (Plex/Jellyfin response parsing)
*
* Run: pnpm test:unit
*/
import { defineConfig, mergeConfig } from 'vitest/config';
import { sharedConfig } from './vitest.shared.js';
export default mergeConfig(
sharedConfig,
defineConfig({
test: {
name: 'unit',
include: [
'src/utils/__tests__/*.test.ts',
'src/test/schemas.test.ts',
'src/services/mediaServer/__tests__/*.test.ts',
],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'json-summary'],
reportsDirectory: './coverage/unit',
include: [
'src/utils/**/*.ts',
'src/services/mediaServer/**/*.ts',
],
exclude: ['**/*.test.ts', '**/test/**'],
},
},
})
);