mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-23 10:45:33 -04:00
1bcb9d7cb9
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
23 lines
687 B
TypeScript
23 lines
687 B
TypeScript
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"])
|
|
})
|
|
})
|