Skip to content

Commit 336392b

Browse files
committed
mock rate limiter implementation
1 parent 47402ec commit 336392b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/unit/vitest.setup.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
import { vi } from "vitest";
22
import { allAppRoles, AppRoles } from "../../src/common/roles.js";
3-
import { group } from "console";
3+
4+
vi.mock(
5+
import("../../src/api/plugins/rateLimiter.js"),
6+
async (importOriginal) => {
7+
const mod = await importOriginal();
8+
return {
9+
...mod,
10+
isAtLimit: vi.fn(async (_) => {
11+
return false;
12+
}),
13+
};
14+
},
15+
);
416

517
vi.mock(
618
import("../../src/api/functions/authorization.js"),

0 commit comments

Comments
 (0)