test(chapter-34): cover message-credit enforcement edges

↗ view on GitHub · Amal · 2026-05-24 · 27694ca4

Chapter: 34 - Quota regression tests.

Plain-English map:
Add unit tests for the monthly message-credit gate, including reset dates,
limit boundaries, null counters, and database-error behavior.

Why it matters:
A quota bug can either block legitimate users or make the limit meaningless.
The important edge cases need to be pinned down.

Principle:
Server-side gates need boundary tests.

Precedent borrowed:
Chapter 23 and the fork report's testing-focused active forks.

Upstream base: willchen96/mike@d39f580.
Original local commit: 919665e.
Repository amal66/mike
Author Amal <mamalanand3@gmail.com>
Authored
Parents 0de61709
Stats 1 file changed , +166
Part of Server-side message-credit quota enforcement

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-27694ca4.md from inside the repo you want the change in.

⬇ Download capture-commit-27694ca4.md