Complete test coverage implementation for errors.bitreport.pt: admin-ui (98 tests): - test/components/: AppShell, DataAlert, IncidentNotes, KpiCard, SeverityBadge, StateBadge - test/lib/: format, demo-incidents, incidents-data, incidents-data-api, stats-data, stats-data-api - vitest.config.ts with jsdom + v8 coverage + @vitejs/plugin-react api route tests (54 tests): - src/routes/admin/auth.test.ts (15 tests) - src/routes/admin/incidents.test.ts (11 tests) - src/routes/admin/stats.test.ts (18 tests) - src/routes/public/errorMonitoringStats.test.ts (10 tests) collector-worker db/scheduler tests (22 tests): - src/db/collectorRunWriter.test.ts (10 tests) - src/db/loadActiveSources.test.ts (6 tests) - src/scheduler/runHttpSourceOnce.test.ts (6 tests) ingest-api service tests (13 tests): - src/buildApp.test.ts, plugins/prometheus.test.ts - services/ingestAuth.test.ts, services/processIngestBatch.utils.test.ts Total: 187 additional tests (255 total across all modules). All pass. Paperclip-Issue: BIT-15744 Co-Authored-By: Paperclip <[email protected]>
39 lines
1.0 KiB
JSON
39 lines
1.0 KiB
JSON
{
|
|
"name": "@errors-bitreport/api",
|
|
"version": "0.1.0",
|
|
"description": "BitReport Error Reporting Platform — Fastify API",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "tsx watch src/index.ts",
|
|
"build": "tsc",
|
|
"start": "node dist/index.js",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage",
|
|
"db:migrate": "bash ../scripts/run-mysql-migrations.sh"
|
|
},
|
|
"dependencies": {
|
|
"@fastify/cookie": "^9.3.1",
|
|
"@fastify/helmet": "^11.1.1",
|
|
"@fastify/jwt": "^8.0.1",
|
|
"@fastify/rate-limit": "^9.1.0",
|
|
"@fastify/swagger": "^8.14.0",
|
|
"@fastify/swagger-ui": "^3.0.0",
|
|
"bcrypt": "^5.1.1",
|
|
"fastify": "^4.28.1",
|
|
"mysql2": "^3.11.5",
|
|
"pino": "^9.1.0",
|
|
"prom-client": "^15.1.3",
|
|
"zod": "^3.23.8"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bcrypt": "^5.0.2",
|
|
"@types/node": "^20.14.0",
|
|
"@vitest/coverage-v8": "^1.6.1",
|
|
"tsx": "^4.15.6",
|
|
"typescript": "^5.4.5",
|
|
"vitest": "^1.6.0"
|
|
}
|
|
}
|