test: add unit tests for rate limiter middleware

This commit is contained in:
2026-04-03 16:05:54 +02:00
parent 86a4a747b5
commit 0d7c4f476a
8 changed files with 2115 additions and 0 deletions

View File

@@ -46,3 +46,8 @@ export async function rateLimit(c: Context, next: Next) {
entry.count++;
return next();
}
/** @internal — only for testing */
export function _resetForTesting() {
store.clear();
}