fix Topology test

This commit is contained in:
Umur Ozkul 2022-08-26 01:32:38 +02:00
parent 4e5e05530e
commit 0a8afc66a4

View File

@ -5,7 +5,7 @@ open Jest
open Expect open Expect
open Expect.Operators open Expect.Operators
describe("Topology", () => { describe("Topology Diff", () => {
test("when equal 1x", () => { test("when equal 1x", () => {
Topology.runOrderDiff(["a"], ["a"])->expect == [] Topology.runOrderDiff(["a"], ["a"])->expect == []
}) })
@ -21,4 +21,16 @@ describe("Topology", () => {
test("more dependents", () => { test("more dependents", () => {
Topology.runOrderDiff(["a", "b", "c", "d"], ["a", "b"])->expect == ["c", "d"] 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"]
})
}) })