Skip to content

Commit ea24eb8

Browse files
committed
test(shortcuts): cover command palette registry entries
1 parent 56973d5 commit ea24eb8

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

frontend/src/lib/__tests__/shortcutRegistry.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,20 @@ describe("shortcutRegistry", () => {
3030
expect(getShortcutCommand("shortcut-help")?.availableIn).toEqual(["web", "desktop"]);
3131
});
3232

33+
it("keeps command-palette command IDs backed by the registry", () => {
34+
for (const commandId of [
35+
"toggle-note-list",
36+
"toggle-editor-fullscreen",
37+
"split-right",
38+
"split-down",
39+
"close-split",
40+
]) {
41+
expect(getShortcutCommand(commandId), commandId).toBeDefined();
42+
}
43+
expect(formatShortcutForCommand("toggle-note-list", "windows", "web")).toBe("Ctrl+Shift+B");
44+
expect(formatShortcutForCommand("split-right", "windows", "web")).toBe("");
45+
});
46+
3347
it("detects the current desktop platform", () => {
3448
expect(detectShortcutPlatform({ platform: "MacIntel" })).toBe("macos");
3549
expect(detectShortcutPlatform({ platform: "Win32" })).toBe("windows");

0 commit comments

Comments
 (0)