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

Function createMissingWorkflowTx

apps/sim/lib/workflows/persistence/utils.test.ts:853–870  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

851
852 describe('workflow row locking', () => {
853 function createMissingWorkflowTx() {
854 const lockFor = vi.fn().mockResolvedValue([])
855 const limit = vi.fn(() => ({ for: lockFor }))
856 const where = vi.fn(() => ({ limit }))
857 const from = vi.fn(() => ({ where }))
858 const select = vi.fn(() => ({ from }))
859 const update = vi.fn()
860
861 return {
862 tx: {
863 execute: vi.fn().mockResolvedValue([{ id: mockWorkflowId }]),
864 select,
865 update,
866 },
867 lockFor,
868 update,
869 }
870 }
871
872 it('returns not_found when deploy cannot lock a workflow row', async () => {
873 const { tx, lockFor } = createMissingWorkflowTx()

Callers 1

utils.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected