mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 22:50:51 +00:00
Two regression nets for the W-POOL changes shipped in the prior two commits: * `src/lib/__tests__/db.test.ts` — assert `getPoolMax()` returns 20 by default and honours `DATABASE_POOL_MAX`, with a final assertion that pins the floor at 20 so a future refactor that drops the explicit `max:` config can't silently revert to the library default of 10. * `src/app/api/analytics/__tests__/route.test.ts` — instrument the per-type `findMany` mock with inflight counters and assert peak concurrency never exceeds `ANALYTICS_TYPE_FETCH_CONCURRENCY`. The wall-clock window also catches both an unbounded `Promise.all` regression (would finish too fast) and an accidental serialisation (would finish too slow).