Commit 793cff2
authored
test(analytics): comprehensive integration and edge-case tests (#3308)
* 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 #3298
* fix(skills): align verify, feature, and pull-request with Vue conventions
* fix(analytics): update comprehensive tests for async init and query stripping1 parent 7a24d2a commit 793cff2
4 files changed
Lines changed: 632 additions & 3 deletions
File tree
- .claude/skills
- feature
- pull-request
- modules/analytics/tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
| |||
0 commit comments