MCPcopy Index your code
hub / github.com/simstudioai/sim / mockUpdateChain

Function mockUpdateChain

apps/sim/app/api/auth/oauth/utils.test.ts:46–51  ·  view source on GitHub ↗

* Creates a chainable mock for db.update() calls. * Returns a nested chain: update() -> set() -> where()

()

Source from the content-addressed store, hash-verified

44 * Returns a nested chain: update() -> set() -> where()
45 */
46function 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
53describe('OAuth Utils', () => {
54 beforeEach(() => {

Callers 1

utils.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected