Commit preview panel at the bottom; open other repositories from a recent list or a folder picker
ci / check (push) Successful in 4m13s
release / release (push) Successful in 9m54s

This commit is contained in:
2026-10-15 00:00:12 +02:00
parent 0c5340aca4
commit 58268c4015
14 changed files with 725 additions and 45 deletions
+18
View File
@@ -0,0 +1,18 @@
import { describe, expect, it } from "vitest";
import { addRecent, MAX_RECENTS } from "./recents";
describe("addRecent", () => {
it("puts the path first", () => {
expect(addRecent(["/a", "/b"], "/c")).toEqual(["/c", "/a", "/b"]);
});
it("moves a path that is already there to the front instead of repeating it", () => {
expect(addRecent(["/a", "/b", "/c"], "/b")).toEqual(["/b", "/a", "/c"]);
});
it("keeps the list short", () => {
const many = Array.from({ length: MAX_RECENTS }, (_, i) => `/r${i}`);
const out = addRecent(many, "/new");
expect(out).toHaveLength(MAX_RECENTS);
expect(out[0]).toBe("/new");
expect(out).not.toContain(`/r${MAX_RECENTS - 1}`);
});
});