Some checks are pending
CI / Lint bridge (Biome) (push) Waiting to run
CI / Type-check bridge (push) Blocked by required conditions
CI / Tests unit bridge (push) Blocked by required conditions
CI / Tests integration bridge (push) Blocked by required conditions
CI / Security scan (push) Waiting to run
CI / Docker build + healthcheck (push) Blocked by required conditions
Redis Streams pub/sub (XADD/XREAD BLOCK) with Last-Event-ID replay, bounded backpressure queue, 25s heartbeat, and full retry/abort handling. Publishes RealtimeEvents from Baserow webhook handler after cache invalidation. 380 tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
89 lines
2.6 KiB
TypeScript
89 lines
2.6 KiB
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: false,
|
|
environment: 'node',
|
|
include: ['tests/**/*.test.ts'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'lcov', 'html'],
|
|
include: ['src/**/*.ts'],
|
|
exclude: ['src/**/*.test.ts', 'src/index.ts'],
|
|
thresholds: {
|
|
// Threshold strict applique sur src/domain. Adapters couverts via tests integration (bloc 6).
|
|
'src/domain/**': {
|
|
lines: 80,
|
|
functions: 80,
|
|
branches: 80,
|
|
statements: 80,
|
|
},
|
|
'src/adapters/**': {
|
|
lines: 70,
|
|
functions: 70,
|
|
branches: 70,
|
|
statements: 70,
|
|
},
|
|
'src/webhooks/**': {
|
|
lines: 80,
|
|
functions: 80,
|
|
branches: 80,
|
|
statements: 80,
|
|
},
|
|
// Bloc 4 : auth middleware OIDC-ready. Seuil >= 85% lines+branches.
|
|
'src/middleware/auth.ts': {
|
|
lines: 85,
|
|
functions: 85,
|
|
branches: 85,
|
|
statements: 85,
|
|
},
|
|
// R2.3b : verifier JWT HMAC DocAdenice.
|
|
'src/middleware/docmost-jwt-verifier.ts': {
|
|
lines: 85,
|
|
functions: 85,
|
|
branches: 85,
|
|
statements: 85,
|
|
},
|
|
// Bloc 5 : rate limit middleware + cache helper.
|
|
'src/middleware/rate-limit.ts': {
|
|
lines: 85,
|
|
functions: 85,
|
|
branches: 85,
|
|
statements: 85,
|
|
},
|
|
'src/lib/cache.ts': {
|
|
lines: 85,
|
|
functions: 85,
|
|
branches: 85,
|
|
statements: 85,
|
|
},
|
|
// R3.1.b : domain/event.ts — 100% coverage cible (schema pur, pas de branche complexe).
|
|
'src/domain/event.ts': {
|
|
lines: 100,
|
|
functions: 100,
|
|
branches: 100,
|
|
statements: 100,
|
|
},
|
|
// R3.1.b : event-bus.ts — 100% lines/funcs/stmts, branches >= 90%.
|
|
// Branches non couverts (94%) : operateur ?? sur xadd null et checks
|
|
// signal.aborted inline que l'on couvre via tests d'abort direct.
|
|
'src/lib/event-bus.ts': {
|
|
lines: 100,
|
|
functions: 100,
|
|
branches: 90,
|
|
statements: 100,
|
|
},
|
|
// R3.1.b : events.ts (route SSE) — lignes 208-210 (heartbeat guard already-closed)
|
|
// et 246-253 (Hono onError safety net) non atteignables via les tests unitaires
|
|
// Hono sans setup serveur reel. Seuil >= 78% lines, >= 70% branches.
|
|
'src/routes/events.ts': {
|
|
lines: 78,
|
|
functions: 85,
|
|
branches: 70,
|
|
statements: 78,
|
|
},
|
|
},
|
|
},
|
|
passWithNoTests: true,
|
|
},
|
|
});
|