Skip to content

Commit 2e757e6

Browse files
committed
Mock supabase
1 parent 2bf1c56 commit 2e757e6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

course-matrix/backend/__tests__/auth.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ jest.mock("node-cron", () => ({
77
schedule: jest.fn(), // Mock the `schedule` function
88
}));
99

10+
jest.mock("../src/db/setupDb", () => ({
11+
supabase: {
12+
from: jest.fn(() => ({
13+
select: jest.fn(),
14+
insert: jest.fn(),
15+
update: jest.fn(),
16+
delete: jest.fn(),
17+
})),
18+
},
19+
}));
20+
1021
jest.mock("../src/controllers/userController", () => ({
1122
signUp: jest.fn((req: Request, res: Response) => {
1223
const { email, password, username } = req.body;

0 commit comments

Comments
 (0)