Add custom intervention modals

This commit is contained in:
adilallo
2026-05-01 22:05:05 -06:00
parent 58d0e33500
commit dee2dd800e
67 changed files with 3480 additions and 197 deletions
@@ -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"]);
});
});