* Creates a chainable mock for db.update() calls. * Returns a nested chain: update() -> set() -> where()
()
| 44 | * Returns a nested chain: update() -> set() -> where() |
| 45 | */ |
| 46 | function mockUpdateChain() { |
| 47 | const mockWhere = vi.fn().mockResolvedValue({}) |
| 48 | const mockSet = vi.fn().mockReturnValue({ where: mockWhere }) |
| 49 | mockDb.update.mockReturnValueOnce({ set: mockSet }) |
| 50 | return { mockSet, mockWhere } |
| 51 | } |
| 52 | |
| 53 | describe('OAuth Utils', () => { |
| 54 | beforeEach(() => { |