Skip to content

Commit 8e9305c

Browse files
test(sql-example): remove unused jest.mock('pg')
Handler doesn't import pg directly, mock was unnecessary. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 914aee0 commit 8e9305c

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

functions/sql-example/__tests__/handler.test.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
const mockQuery = jest.fn();
22
const mockRelease = jest.fn();
33

4-
jest.mock('pg', () => ({
5-
Pool: jest.fn().mockImplementation(() => ({
6-
connect: jest.fn().mockResolvedValue({
7-
query: mockQuery,
8-
release: mockRelease,
9-
}),
10-
})),
11-
Client: jest.fn().mockImplementation(() => ({
12-
connect: jest.fn(),
13-
query: mockQuery,
14-
end: jest.fn(),
15-
})),
16-
}));
17-
184
const createMockContext = () => {
195
const mockClient = {
206
query: mockQuery,

0 commit comments

Comments
 (0)