fix(test): type drizzle mock callbacks for tsc
Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
096f55b394
commit
22234fe102
2 files changed
+3
-2
No files matched your search
@@ -10,7 +10,7 @@ const { selectLimit, insertOnDup, mockSendMail, mockRedirect } = vi.hoisted(
|
||||
);
|
||||
|
||||
vi.mock("next/navigation", () => ({
|
||||
redirect: (...args) => {
|
||||
redirect: (...args: unknown[]) => {
|
||||
mockRedirect(...args);
|
||||
throw new Error("redirect");
|
||||
},
|
||||
|
||||
@@ -15,7 +15,8 @@ vi.mock("next/headers", () => ({
|
||||
headers: () =>
|
||||
new Promise((resolve) =>
|
||||
resolve({
|
||||
get: (key) => (key === "x-real-client-ip" ? "192.168.1.1" : null),
|
||||
get: (key: string) =>
|
||||
key === "x-real-client-ip" ? "192.168.1.1" : null,
|
||||
}),
|
||||
),
|
||||
}));
|
||||
|
||||
Reference in new issue
Block a user