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

main
ts 22 lines 753 Bytes
Raw
1 import { describe, expect, it } from "vite-plus/test";
2
3 import { resolveComposerMenuActiveItemId } from "./composerMenuHighlight";
4
5 describe("resolveComposerMenuActiveItemId", () => {
6 it("clears the active result while async results are empty and resolves against restored results", () => {
7 const search = {
8 highlightedItemId: "second",
9 currentSearchKey: "path:src",
10 highlightedSearchKey: "path:src",
11 };
12 const cleared = resolveComposerMenuActiveItemId({ ...search, items: [] });
13 expect(cleared).toBeNull();
14 expect(
15 resolveComposerMenuActiveItemId({
16 ...search,
17 highlightedItemId: cleared,
18 items: [{ id: "new-result" }, { id: "second" }],
19 }),
20 ).toBe("new-result");
21 });
22 });