File tree Expand file tree Collapse file tree
frontend/src/lib/__tests__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,20 @@ describe("shortcutRegistry", () => {
3030 expect ( getShortcutCommand ( "shortcut-help" ) ?. availableIn ) . toEqual ( [ "web" , "desktop" ] ) ;
3131 } ) ;
3232
33+ it ( "keeps command-palette command IDs backed by the registry" , ( ) => {
34+ for ( const commandId of [
35+ "toggle-note-list" ,
36+ "toggle-editor-fullscreen" ,
37+ "split-right" ,
38+ "split-down" ,
39+ "close-split" ,
40+ ] ) {
41+ expect ( getShortcutCommand ( commandId ) , commandId ) . toBeDefined ( ) ;
42+ }
43+ expect ( formatShortcutForCommand ( "toggle-note-list" , "windows" , "web" ) ) . toBe ( "Ctrl+Shift+B" ) ;
44+ expect ( formatShortcutForCommand ( "split-right" , "windows" , "web" ) ) . toBe ( "" ) ;
45+ } ) ;
46+
3347 it ( "detects the current desktop platform" , ( ) => {
3448 expect ( detectShortcutPlatform ( { platform : "MacIntel" } ) ) . toBe ( "macos" ) ;
3549 expect ( detectShortcutPlatform ( { platform : "Win32" } ) ) . toBe ( "windows" ) ;
You can’t perform that action at this time.
0 commit comments