- Follow-up on #862
- Corrects issues with floating reroute switch logic
- Updates test expectations
This commit is contained in:
filtered
2025-03-28 09:00:58 +11:00
committed by GitHub
parent 59317bcda7
commit 7b3ea64714
3 changed files with 53 additions and 6 deletions

View File

@@ -734,7 +734,7 @@ describe("LinkConnector Integration", () => {
for (const [index, parentId] of parentIds.entries()) {
const reroute = graph.reroutes.get(parentId)!
if (linksAfter[index] === undefined) {
expect(reroute).toBeUndefined()
expect(reroute).not.toBeUndefined()
} else {
expect(reroute.linkIds.size).toBe(linksAfter[index])
}
@@ -852,10 +852,15 @@ describe("LinkConnector Integration", () => {
expect([...toReroute.linkIds.values()]).toEqual(nextLinkIds)
// Parent reroutes should have lost the links or been removed
for (const rerouteId of shouldBeRemoved) {
const reroute = graph.reroutes.get(rerouteId)!
expect(reroute).toBeUndefined()
if (testFloatingInputs) {
// Already-floating reroutes should be removed
expect(reroute).toBeUndefined()
} else {
// Non-floating reroutes should still exist
expect(reroute).not.toBeUndefined()
}
}
for (const rerouteId of shouldHaveLinkIdsRemoved) {