Add custom intervention modals

This commit is contained in:
adilallo committed 2026-05-01 22:05:05 -06:00
1 parent 58d0e33500
commit dee2dd800e
67 files changed
+3480 -197

No files matched your search

@@ -0,0 +1,20 @@
import { describe, expect, it } from "vitest";
import { moveFacetSelectionIdToFront } from "../../lib/create/methodCardSelectionOrder";
describe("moveFacetSelectionIdToFront", () => {
it("places a new id at index 0", () => {
expect(moveFacetSelectionIdToFront(["a", "b"], "c")).toEqual(["c", "a", "b"]);
});
it("moves an existing id to index 0 without duplicating", () => {
expect(moveFacetSelectionIdToFront(["a", "b", "c"], "b")).toEqual([
"b",
"a",
"c",
]);
});
it("handles empty prior selection", () => {
expect(moveFacetSelectionIdToFront([], "x")).toEqual(["x"]);
});
});