| 62 | } |
| 63 | |
| 64 | function createMockContext(overrides: Partial<ExecutionContext> = {}): ExecutionContext { |
| 65 | return { |
| 66 | workflowId: 'test-workflow', |
| 67 | workspaceId: 'test-workspace', |
| 68 | executionId: 'test-execution', |
| 69 | userId: 'test-user', |
| 70 | blockStates: new Map(), |
| 71 | executedBlocks: new Set(), |
| 72 | blockLogs: [], |
| 73 | loopExecutions: new Map(), |
| 74 | parallelExecutions: new Map(), |
| 75 | completedLoops: new Set(), |
| 76 | activeExecutionPath: new Set(), |
| 77 | metadata: { |
| 78 | executionId: 'test-execution', |
| 79 | startTime: new Date().toISOString(), |
| 80 | pendingBlocks: [], |
| 81 | }, |
| 82 | envVars: {}, |
| 83 | ...overrides, |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | function createMockDAG(nodes: DAGNode[]): DAG { |
| 88 | const nodeMap = new Map<string, DAGNode>() |