* Helper to create a DAG for testing
(nodes: DAGNode[])
| 50 | * Helper to create a DAG for testing |
| 51 | */ |
| 52 | function createDAG(nodes: DAGNode[]): DAG { |
| 53 | const nodeMap = new Map<string, DAGNode>() |
| 54 | for (const node of nodes) { |
| 55 | nodeMap.set(node.id, node) |
| 56 | } |
| 57 | |
| 58 | // Set up incoming edges based on outgoing edges |
| 59 | for (const node of nodes) { |
| 60 | for (const [, edge] of node.outgoingEdges) { |
| 61 | const targetNode = nodeMap.get(edge.target) |
| 62 | if (targetNode) { |
| 63 | targetNode.incomingEdges.add(node.id) |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | return { |
| 69 | nodes: nodeMap, |
| 70 | loopConfigs: new Map<string, SerializedLoop>(), |
| 71 | parallelConfigs: new Map<string, SerializedParallel>(), |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | describe('computeDirtySet', () => { |
| 76 | it('includes start block in dirty set', () => { |
no test coverage detected