import { describe, it, expect } from 'vitest';
import { DEFAULT_SHORTCUTS } from '../commands/keyboard';

describe('commands/keyboard', () => {
	describe('DEFAULT_SHORTCUTS', () => {
		it('is an object', () => {
			expect(typeof DEFAULT_SHORTCUTS).toBe('object');
		});

		it('has common shortcuts', () => {
			expect(DEFAULT_SHORTCUTS.copy).toBe('ctrl+c');
			expect(DEFAULT_SHORTCUTS.cut).toBe('ctrl+x');
			expect(DEFAULT_SHORTCUTS.paste).toBe('ctrl+v');
			expect(DEFAULT_SHORTCUTS.delete).toBe('Delete');
		});

		it('has command line shortcuts', () => {
			expect(DEFAULT_SHORTCUTS.openCommandLine).toBe('/');
			expect(DEFAULT_SHORTCUTS.closeCommandLine).toBe('Escape');
		});

		it('has search shortcuts', () => {
			expect(DEFAULT_SHORTCUTS.search).toBe('ctrl+f');
			expect(DEFAULT_SHORTCUTS.nextSearchResult).toBe('Enter');
		});

		it('has selection shortcuts', () => {
			expect(DEFAULT_SHORTCUTS.selectAll).toBe('ctrl+a');
			expect(DEFAULT_SHORTCUTS.clearSelection).toBe('Escape');
		});
	});
});
