The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import { describe, expect, it } from "vite-plus/test"; |
| 2 | |
| 3 | import { isPasteAsTextShortcut } from "./textPaste.ts"; |
| 4 | |
| 5 | describe("isPasteAsTextShortcut", () => { |
| 6 | it("accepts the V key on non-Latin layouts but follows the letter on Latin ones", () => { |
| 7 | const chord = { metaKey: false, ctrlKey: true, shiftKey: true, altKey: false }; |
| 8 | expect(isPasteAsTextShortcut({ ...chord, key: "М", code: "KeyV" }, false)).toBe(true); |
| 9 | expect(isPasteAsTextShortcut({ ...chord, key: "k", code: "KeyV" }, false)).toBe(false); |
| 10 | expect(isPasteAsTextShortcut({ ...chord, key: "V", code: "Period" }, false)).toBe(true); |
| 11 | }); |
| 12 | }); |