From ae8293e2cdcfb30cea007700870247c7dbde99f4 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Tue, 22 Jul 2025 10:59:30 -0700 Subject: [PATCH] [test] Remove redundant circular reference TODO test (#1148) --- test/subgraph/SubgraphNode.test.ts | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/test/subgraph/SubgraphNode.test.ts b/test/subgraph/SubgraphNode.test.ts index 3d0112eaf..732c89eb4 100644 --- a/test/subgraph/SubgraphNode.test.ts +++ b/test/subgraph/SubgraphNode.test.ts @@ -337,8 +337,7 @@ describe("SubgraphNode Execution", () => { }) it("should prevent infinite recursion", () => { - // TODO: This test is currently skipped because cycle detection has a bug - // The fix is to pass 'visited' directly instead of 'new Set(visited)' in SubgraphNode.ts:299 + // Cycle detection properly prevents infinite recursion when a subgraph contains itself const subgraph = createTestSubgraph({ nodeCount: 1 }) const subgraphNode = createTestSubgraphNode(subgraph) @@ -402,21 +401,6 @@ describe("SubgraphNode Execution", () => { }) describe("SubgraphNode Edge Cases", () => { - it.todo("should detect circular references", () => { - // TODO: This test is currently skipped because cycle detection has a bug - // The fix is to pass 'visited' directly instead of 'new Set(visited)' in SubgraphNode.ts:299 - const subgraph = createTestSubgraph({ nodeCount: 1 }) - const subgraphNode = createTestSubgraphNode(subgraph) - - // Add subgraph node to its own subgraph (circular reference) - subgraph.add(subgraphNode) - - const executableNodes = new Map() - expect(() => { - subgraphNode.getInnerNodes(executableNodes) - }).toThrow(/while flattening subgraph/i) - }) - it("should handle deep nesting", () => { // Create a simpler deep nesting test that works with current implementation const subgraph = createTestSubgraph({