Commit 5a627ad
committed
test(analytics): add comprehensive integration and edge-case tests
Express integration tests (supertest): middleware tracks real requests,
handles concurrent load, skips health routes, captures query strings.
Service resilience tests: SDK error propagation (sync + async),
post-shutdown no-op safety, double-shutdown idempotency, optional args.
Init wiring tests: module init calls AnalyticsService.init(), registers
middleware, sets up billing plan.changed listener with error isolation.
Feature-flag middleware edge cases: falsy _id variants (null, 0, empty),
ObjectId-like coercion, concurrent flag evaluations, 403 response shape.
Closes #32981 parent 7a24d2a commit 5a627ad
2 files changed
Lines changed: 628 additions & 0 deletions
File tree
- modules/analytics/tests
0 commit comments