chore(prettier): full repo linting and code reformatting once and for all (#3627)

This commit is contained in:
Alireza authored and GitHub committed 2023-09-01 16:19:39 -04:00
1 parent 01500a2d4c
commit 9045ddaedc
656 files changed
+21737 -20628

No files matched your search

@@ -21,11 +21,7 @@ describe('HotkeysManager', () => {
});
it('has expected properties', () => {
const allProperties = Object.keys(hotkeysManager);
const expectedProperties = [
'hotkeyDefinitions',
'hotkeyDefaults',
'isEnabled',
];
const expectedProperties = ['hotkeyDefinitions', 'hotkeyDefaults', 'isEnabled'];
const containsAllExpectedProperties = expectedProperties.every(expected =>
allProperties.includes(expected)
@@ -134,21 +130,16 @@ describe('HotkeysManager', () => {
hotkeysManager.registerHotkeys(definition);
const numOfHotkeyDefinitions = Object.keys(
hotkeysManager.hotkeyDefinitions
).length;
const numOfHotkeyDefinitions = Object.keys(hotkeysManager.hotkeyDefinitions).length;
const commandHash = objectHash({
commandName: definition.commandName,
commandOptions: definition.commandOptions,
});
const hotkeyDefinitionForRegisteredCommand =
hotkeysManager.hotkeyDefinitions[commandHash];
const hotkeyDefinitionForRegisteredCommand = hotkeysManager.hotkeyDefinitions[commandHash];
expect(numOfHotkeyDefinitions).toBe(1);
expect(Object.keys(hotkeysManager.hotkeyDefinitions)[0]).toEqual(
commandHash
);
expect(Object.keys(hotkeysManager.hotkeyDefinitions)[0]).toEqual(commandHash);
expect(hotkeyDefinitionForRegisteredCommand).toEqual(definition);
});
it('calls hotkeys.bind for the group of keys', () => {
@@ -182,9 +173,7 @@ describe('HotkeysManager', () => {
hotkeysManager.restoreDefaultBindings();
expect(hotkeysManager.setHotkeys.mock.calls[0][0]).toEqual(
hotkeysManager.hotkeyDefaults
);
expect(hotkeysManager.setHotkeys.mock.calls[0][0]).toEqual(hotkeysManager.hotkeyDefaults);
});
});