test: add unit tests for rate limiter middleware
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user