- Add pytest config in backend/pyproject.toml with asyncio mode and coverage - Add backend/requirements-test.txt with pytest, pytest-cov, pytest-asyncio, aiosqlite - Write 86 backend unit tests covering auth (JWT tokens), schemas (Pydantic models), config (Settings env overrides), log_parser (log parsing, IP resolution, geo data), models (SQLAlchemy table definitions + column defaults), and theme export - Add Vitest config for Angular frontend (vitest.config.ts, src/test-setup.ts) - Add .gitlab-ci.yml with stages: backend-test, frontend-test, backend-lint, docker-build, and quality-gate - CI enforces 10% minimum coverage threshold for backend
22 lines
475 B
TypeScript
22 lines
475 B
TypeScript
/** @type {import('vite').UserConfig} */
|
|
export default {
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
include: ['src/**/*.spec.ts'],
|
|
setupFiles: ['src/test-setup.ts'],
|
|
reporters: ['default', 'html'],
|
|
coverage: {
|
|
enabled: true,
|
|
reportsDirectory: 'coverage/frontend',
|
|
reporter: ['text', 'html', 'lcov'],
|
|
thresholds: {
|
|
lines: 0,
|
|
branches: 0,
|
|
functions: 0,
|
|
statements: 0,
|
|
},
|
|
},
|
|
},
|
|
};
|