@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 19 lines 788 Bytes
Raw
1 import { describe, expect, it } from "vite-plus/test";
2
3 import { commandForProjectScript } from "../projectScripts";
4 import {
5 decodeProjectScriptKeybindingRule,
6 keybindingValueForCommand,
7 PROJECT_SCRIPT_KEYBINDING_INVALID_MESSAGE,
8 } from "./projectScriptKeybindings";
9
10 describe("projectScriptKeybindings", () => {
11 it("can edit or delete a legacy script without a shortcut", () => {
12 const command = commandForProjectScript("install-javascript-dependencies");
13 expect(keybindingValueForCommand([], command)).toBeNull();
14 expect(decodeProjectScriptKeybindingRule({ keybinding: null, command })).toBeNull();
15 expect(() => decodeProjectScriptKeybindingRule({ keybinding: "mod+k", command })).toThrowError(
16 PROJECT_SCRIPT_KEYBINDING_INVALID_MESSAGE,
17 );
18 });
19 });