Download packages/app/src/components/command-tooltip-keybind.test.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 687 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/app/src/components/command-tooltip-keybind.test.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/app/src/components/command-tooltip-keybind.test.ts
-
curl -L -o command-tooltip-keybind.test.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/app/src/components/command-tooltip-keybind.test.ts
687 Bytes
| import { describe, expect, test } from "bun:test" | |
| import { newTabTooltipKeybind, reviewTooltipKeybind } from "./command-tooltip-keybind" | |
| describe("command tooltip keybinds", () => { | |
| test("keeps localized review shortcut modifiers", () => { | |
| const command = { | |
| keybind: () => "Ctrl+Maj+R", | |
| keybindParts: () => ["Ctrl", "Maj", "R"], | |
| } | |
| expect(reviewTooltipKeybind(command, (key) => key)).toEqual(["Ctrl", "Maj", "R"]) | |
| }) | |
| test("uses the configured new-tab shortcut", () => { | |
| const command = { | |
| keybind: () => "Alt+N", | |
| keybindParts: () => ["Alt", "N"], | |
| } | |
| expect(newTabTooltipKeybind(command, (key) => key)).toEqual(["Alt", "N"]) | |
| }) | |
| }) | |