diff --git a/packages/squiggle-lang/__tests__/ReducerProject/ReducerProject_Topology_test.res b/packages/squiggle-lang/__tests__/ReducerProject/ReducerProject_Topology_test.res index 2399c808..da5ab5af 100644 --- a/packages/squiggle-lang/__tests__/ReducerProject/ReducerProject_Topology_test.res +++ b/packages/squiggle-lang/__tests__/ReducerProject/ReducerProject_Topology_test.res @@ -5,7 +5,7 @@ open Jest open Expect open Expect.Operators -describe("Topology", () => { +describe("Topology Diff", () => { test("when equal 1x", () => { Topology.runOrderDiff(["a"], ["a"])->expect == [] }) @@ -21,4 +21,16 @@ describe("Topology", () => { test("more dependents", () => { Topology.runOrderDiff(["a", "b", "c", "d"], ["a", "b"])->expect == ["c", "d"] }) + + test("change midway", () => { + Topology.runOrderDiff(["a", "b", "bb", "c", "d"], ["a", "b", "c", "d"])->expect == [ + "bb", + "c", + "d", + ] + }) + + test("swap", () => { + Topology.runOrderDiff(["a", "b", "c", "d"], ["a", "c", "b", "d"])->expect == ["b", "c", "d"] + }) })