MCPcopy Create free account
hub / github.com/simstudioai/sim / mockCandidates

Function mockCandidates

apps/sim/lib/data-drains/dispatcher.test.ts:26–32  ·  view source on GitHub ↗
(rows: Array<{ id: string; organizationId: string }>)

Source from the content-addressed store, hash-verified

24import { dispatchDueDrains, reapOrphanedRuns } from '@/lib/data-drains/dispatcher'
25
26function mockCandidates(rows: Array<{ id: string; organizationId: string }>) {
27 // db.select().from().where() — override `from` so awaiting `.where(pred)`
28 // resolves with the candidate rows.
29 dbChainMockFns.from.mockReturnValueOnce({
30 where: vi.fn().mockResolvedValueOnce(rows),
31 } as never)
32}
33
34beforeEach(() => {
35 vi.clearAllMocks()

Callers 1

dispatcher.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected