Open History to see the last commit
1import { expect, it } from "vite-plus/test";
2
3import { readExpandedDirectories, writeExpandedDirectories } from "./fileTreeExpansion";
4
5it("keeps the 100 expanded folders nearest the root, so a remount does not list hundreds", () => {
6 const deep = Array.from({ length: 150 }, (_, index) => `pkg/mod/d${index}/`);
7 writeExpandedDirectories("env:/repo", [...deep, "pkg/mod/", "pkg/"]);
8 const restored = readExpandedDirectories("env:/repo");
9 expect(restored).toEqual(["pkg/", "pkg/mod/", ...deep.slice(0, 98)]);
10});