// Platform shortcut labels (src/lib/ui/shortcuts.ts). import assert from 'node:assert/strict'; import { test } from 'node:test'; import { keys, shortcutLabel } from '../../../src/lib/ui/shortcuts.ts'; test('Windows and Linux labels use Ctrl, Alt, and Shift with plus signs', () => { assert.equal(keys('Mod+Shift+P', false), 'Ctrl+Shift+P'); assert.equal(keys('Mod+\\', false), 'Ctrl+\\'); assert.equal(keys('Mod+,', false), 'Ctrl+,'); assert.equal(keys('F1', false), 'F1'); assert.equal(keys('Shift+Delete', false), 'Shift+Delete'); assert.equal(shortcutLabel({ key: 'Tab', ctrl: true, shift: true }, false), 'Ctrl+Shift+Tab'); assert.equal(shortcutLabel({ key: 'z', mod: true, alt: true, shift: true }, false), 'Ctrl+Alt+Shift+Z'); }); test('macOS labels use the symbols in the Apple order', () => { assert.equal(keys('Mod+Shift+P', true), '⇧⌘P'); assert.equal(keys('Mod+B', true), '⌘B'); assert.equal(shortcutLabel({ key: 'Tab', ctrl: true, shift: true }, true), '⌃⇧⇥'); assert.equal(shortcutLabel({ key: 'z', mod: true, alt: true, shift: true }, true), '⌥⇧⌘Z'); assert.equal(keys('Escape', true), '⎋'); });