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

Function createTestContext

apps/sim/executor/variables/resolvers/parallel.test.ts:78–99  ·  view source on GitHub ↗

* Creates a minimal ResolutionContext for testing.

(
  currentNodeId: string,
  parallelExecutions?: Map<string, any>,
  blockOutputs?: Record<string, any>,
  parallelBlockMapping?: Map<string, any>,
  subflowParentMap?: Map<string, any>
)

Source from the content-addressed store, hash-verified

76 * Creates a minimal ResolutionContext for testing.
77 */
78function createTestContext(
79 currentNodeId: string,
80 parallelExecutions?: Map<string, any>,
81 blockOutputs?: Record<string, any>,
82 parallelBlockMapping?: Map<string, any>,
83 subflowParentMap?: Map<string, any>
84): ResolutionContext {
85 return {
86 executionContext: {
87 workflowId: 'workflow-1',
88 workspaceId: 'workspace-1',
89 executionId: 'execution-1',
90 parallelExecutions: parallelExecutions ?? new Map(),
91 parallelBlockMapping,
92 subflowParentMap,
93 },
94 executionState: {
95 getBlockOutput: (id: string) => blockOutputs?.[id],
96 },
97 currentNodeId,
98 } as ResolutionContext
99}
100
101describe('ParallelResolver', () => {
102 describe('canResolve', () => {

Callers 1

parallel.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected