diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-08-15 02:12:10 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-08-15 02:12:10 +0200 |
| commit | 5e8a489a147c148b6495a6a25fb4dd9725e6fca6 (patch) | |
| tree | 868dfe4558748d441951202723b109b96aeefe93 /apps/web | |
| parent | 0274fb662647630803598e01c975e6b1439922ab (diff) | |
| download | opencut-5e8a489a147c148b6495a6a25fb4dd9725e6fca6.tar.gz | |
refactor: remove test
Diffstat (limited to 'apps/web')
| -rw-r--r-- | apps/web/src/stores/__tests__/keybindings-store.test.ts | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/apps/web/src/stores/__tests__/keybindings-store.test.ts b/apps/web/src/stores/__tests__/keybindings-store.test.ts deleted file mode 100644 index 8aa5b94f..00000000 --- a/apps/web/src/stores/__tests__/keybindings-store.test.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { describe, it, expect, beforeEach } from 'vitest' -import { useKeybindingsStore } from '../keybindings-store' - -describe('Keybindings Store', () => { - beforeEach(() => { - // Reset store to default state before each test - useKeybindingsStore.getState().resetToDefaults() - }) - - describe('Default Keybindings', () => { - it('should include Enter key mapping to goto-start action', () => { - const { keybindings } = useKeybindingsStore.getState() - expect(keybindings.enter).toBe('goto-start') - }) - - it('should include Home key mapping to goto-start action', () => { - const { keybindings } = useKeybindingsStore.getState() - expect(keybindings.home).toBe('goto-start') - }) - - it('should have both Enter and Home keys for the same action', () => { - const { keybindings } = useKeybindingsStore.getState() - expect(keybindings.enter).toBe(keybindings.home) - }) - }) - - describe('getKeybindingsForAction', () => { - it('should return both Enter and Home keys for goto-start action', () => { - const { getKeybindingsForAction } = useKeybindingsStore.getState() - const keys = getKeybindingsForAction('goto-start') - - expect(keys).toContain('enter') - expect(keys).toContain('home') - expect(keys.length).toBeGreaterThanOrEqual(2) - }) - }) - - describe('Keyboard Event Parsing', () => { - it('should generate correct keybinding string for Enter key', () => { - const { getKeybindingString } = useKeybindingsStore.getState() - - // Mock KeyboardEvent for Enter key - const enterEvent = new KeyboardEvent('keydown', { - key: 'Enter', - code: 'Enter' - }) - - const result = getKeybindingString(enterEvent) - expect(result).toBe('enter') - }) - - it('should generate correct keybinding string for Home key', () => { - const { getKeybindingString } = useKeybindingsStore.getState() - - // Mock KeyboardEvent for Home key - const homeEvent = new KeyboardEvent('keydown', { - key: 'Home', - code: 'Home' - }) - - const result = getKeybindingString(homeEvent) - expect(result).toBe('home') - }) - }) -})
\ No newline at end of file |
