Add test infrastructure and initial test suite

Sets up Vitest + React Testing Library with jsdom, exports utility functions
for unit testing, and adds 78 tests covering pure functions and component
integration flows (chapter loading, chunk management, navigation, Greek word
lookup).

https://claude.ai/code/session_01C4T3bYHR2svLq7JVcxKJ6Y
This commit is contained in:
Claude
2026-05-27 11:04:20 +00:00
parent 9a78e2a65f
commit 3210132a21
7 changed files with 3339 additions and 52 deletions
+10
View File
@@ -3,4 +3,14 @@ import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
test: {
environment: 'jsdom',
globals: true,
setupFiles: './src/test-setup.js',
coverage: {
provider: 'v8',
reporter: ['text', 'html'],
include: ['src/**/*.{js,jsx}'],
},
},
});