@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 15 lines 562 Bytes
Raw
1 import { describe, expect, it } from "vite-plus/test";
2
3 import { toggleAllDiffFiles } from "./diffCollapse";
4
5 describe("toggleAllDiffFiles", () => {
6 it.each([
7 { action: "expanding", collapsed: ["a", "b", "hidden"], expected: ["hidden"] },
8 { action: "collapsing", collapsed: ["a", "hidden"], expected: ["a", "b", "hidden"] },
9 ])(
10 "keeps a folded file outside the given ones folded when $action",
11 ({ collapsed, expected }) => {
12 expect([...toggleAllDiffFiles(["a", "b"], new Set(collapsed))].toSorted()).toEqual(expected);
13 },
14 );
15 });