test: add unit tests for rate limiter middleware
This commit is contained in:
1 parent
86a4a747b5
commit
0d7c4f476a
8 files changed
+2115
No files matched your search
@@ -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