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

Function createTestContext

apps/sim/executor/variables/resolvers/loop.test.ts:61–82  ·  view source on GitHub ↗
(
  currentNodeId: string,
  loopScope?: LoopScope,
  loopExecutions?: Map<string, LoopScope>,
  blockOutputs?: Record<string, any>,
  parallelBlockMapping?: Map<string, any>
)

Source from the content-addressed store, hash-verified

59}
60
61function createTestContext(
62 currentNodeId: string,
63 loopScope?: LoopScope,
64 loopExecutions?: Map<string, LoopScope>,
65 blockOutputs?: Record<string, any>,
66 parallelBlockMapping?: Map<string, any>
67): ResolutionContext {
68 return {
69 executionContext: {
70 workspaceId: 'workspace-1',
71 workflowId: 'workflow-1',
72 executionId: 'execution-1',
73 loopExecutions: loopExecutions ?? new Map(),
74 parallelBlockMapping,
75 },
76 executionState: {
77 getBlockOutput: (id: string) => blockOutputs?.[id],
78 },
79 currentNodeId,
80 loopScope,
81 } as ResolutionContext
82}
83
84describe('LoopResolver', () => {
85 describe('canResolve', () => {

Callers 1

loop.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected