Work towards unifying KeyboardShortcuts and KeyBindingsDefaults #1 (#7651)

This commit is contained in:
Šimon Brandner 2022-01-27 12:37:53 +01:00 committed by GitHub
parent f2249b3e37
commit 57a5647079
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 237 additions and 139 deletions

View file

@ -17,7 +17,7 @@ limitations under the License.
import {
CATEGORIES,
CategoryName,
KEYBOARD_SHORTCUTS,
getKeyboardShortcuts,
registerShortcut,
} from "../../src/accessibility/KeyboardShortcuts";
import { Key } from "../../src/Keyboard";
@ -38,7 +38,7 @@ describe("KeyboardShortcuts", () => {
registerShortcut(shortcutName, shortcutCategory, shortcut);
expect(KEYBOARD_SHORTCUTS[shortcutName]).toBe(shortcut);
expect(getKeyboardShortcuts()[shortcutName]).toBe(shortcut);
expect(CATEGORIES[shortcutCategory].settingNames.includes(shortcutName)).toBeTruthy();
});
});