squiggle/packages/squiggle-lang/__tests__/ReducerProject/ReducerProject_Topology_test.res

25 lines
576 B
Plaintext
Raw Normal View History

2022-08-25 19:59:15 +00:00
@@warning("-44")
module Topology = ReducerProject_Topology
open Jest
open Expect
open Expect.Operators
describe("Topology", () => {
2022-08-25 22:45:13 +00:00
test("when equal 1x", () => {
2022-08-25 19:59:15 +00:00
Topology.runOrderDiff(["a"], ["a"])->expect == []
})
test("when equal 3x", () => {
Topology.runOrderDiff(["a", "b", "c"], ["a", "b", "c"])->expect == []
})
2022-08-25 22:45:13 +00:00
test("less dependents", () => {
Topology.runOrderDiff(["a", "b"], ["a", "b", "c", "d"])->expect == []
})
test("more dependents", () => {
Topology.runOrderDiff(["a", "b", "c", "d"], ["a", "b"])->expect == ["c", "d"]
})
2022-08-25 19:59:15 +00:00
})