Testing: - Add vitest with jsdom environment for unit testing - Create 61 comprehensive tests for keyboard shortcuts - Add test helpers for platform switching and key simulation - Mock SvelteKit $app modules for testing Fix: - Change Windows/Linux shortcuts from Ctrl to Alt to avoid browser shortcut conflicts (Ctrl+N opens new browser window) - Mac shortcuts remain Cmd+N/K/B (unaffected) New shortcuts on Windows/Linux: - Alt+N: New chat - Alt+K: Search conversations - Alt+B: Toggle sidebar 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
26 lines
621 B
TypeScript
26 lines
621 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
import { svelte } from '@sveltejs/vite-plugin-svelte';
|
|
import { resolve } from 'path';
|
|
|
|
export default defineConfig({
|
|
plugins: [svelte({ hot: !process.env.VITEST })],
|
|
test: {
|
|
include: ['src/**/*.{test,spec}.{js,ts}'],
|
|
environment: 'jsdom',
|
|
globals: true,
|
|
setupFiles: ['./src/tests/setup.ts'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html'],
|
|
include: ['src/lib/**/*.ts'],
|
|
exclude: ['src/lib/**/*.svelte', 'src/tests/**']
|
|
}
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
$lib: resolve('./src/lib'),
|
|
$app: resolve('./src/tests/mocks/app')
|
|
}
|
|
}
|
|
});
|