* Creates a minimal ResolutionContext for testing.
( currentNodeId: string, parallelExecutions?: Map<string, any>, blockOutputs?: Record<string, any>, parallelBlockMapping?: Map<string, any>, subflowParentMap?: Map<string, any> )
| 76 | * Creates a minimal ResolutionContext for testing. |
| 77 | */ |
| 78 | function 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 | |
| 101 | describe('ParallelResolver', () => { |
| 102 | describe('canResolve', () => { |