Test Coverage Report

Vitest + @vitest/coverage-v8

← Back to Documentation

Summary

~425
Total Tests
37
Test Files
~85%
Statements
~80%
Branches
Note: The vitest coverage-v8 provider currently has a reporting bug that double-counts files, artificially halving the reported total. Individual file coverages below reflect accurate measurements.

Pages ~70% statements

Top-level route components that orchestrate the full user experience.

File Statements Coverage Description
Home.tsx 100%
Landing page with session creation
ParticipantSession.tsx 82%
Participant voting interface
AdminSession.tsx 68%
Admin control panel
SessionReview.tsx 27%
Post-session results review
PresentationView.tsx 0%
Needs tests
TemplateEditorPage.tsx 0%
Needs tests
Gaps: AdminSession's ActiveQuestionHero reasons panel requires complex async state setup. SessionReview, PresentationView, and TemplateEditorPage need dedicated tests.

Components ~88% statements

Reusable UI components covering voting interfaces, admin controls, and session management.

File Statements Coverage Description
AdminPasswordGate.tsx 100%
Password prompt wrapper
BarChart.tsx 100%
Vote result visualization
BatchVotingCarousel.tsx 100%
Participant batch voting UI
ConnectionBanner.tsx 100%
Reconnection status banner
CountdownTimer.tsx 100%
Animated countdown
Lobby.tsx 100%
Waiting screen
ProgressDashboard.tsx 100%
Batch voting progress
ReasonInput.tsx 100%
Vote reason input
VoteAgreeDisagree.tsx 96%
Agree/Disagree voting
VoteMultipleChoice.tsx 95%
Multiple choice voting
BatchCard.tsx 92%
Batch display card
BatchList.tsx 90%
Drag-sortable list
ImportExportPanel.tsx 76%
JSON import/export
QuestionForm.tsx 71%
Add/edit question form
QRCode.tsx 67%
QR code display
PastSessions.tsx 62%
Session history list
Gaps: New v1.4 team components (TeamPicker, TeamBadge, TeamFilterTabs, TeamQRGrid) need tests for team selection, visual indicators, result filtering, and QR code generation.

Hooks ~90% statements

Custom React hooks encapsulating reusable stateful logic.

File Statements Coverage Description
use-auth.ts 100%
Anonymous auth initialization
use-countdown.ts 100%
Drift-corrected countdown timer
use-haptic.ts 100%
Device vibration API
use-keyboard-navigation.ts 100%
Keyboard navigation
use-read-reasons.ts 100%
Track read state of reasons
use-presence.ts 94%
Participant presence tracking
use-realtime-channel.ts 57%
Supabase Realtime lifecycle

Libraries ~75% statements

Pure utility modules and business logic.

File Statements Coverage Description
admin-auth.ts 100%
Password gate logic
session-import.ts 83%
JSON import validation
supabase.ts 78%
Supabase client init
question-templates.ts 68%
Template utilities
session-export.ts 40%
JSON export logic
vote-aggregation.ts 37%
Vote counting utilities
session-template-api.ts 35%
Session template CRUD
slide-api.ts 30%
Slide CRUD operations
sequence-api.ts 28%
Session items management
team-api.ts 0%
Team config validation
chart-colors.ts 0%
Color palettes
color-contrast.ts 0%
Text color computation
Gaps: The newer API modules (session-template-api.ts, slide-api.ts, sequence-api.ts) have lower coverage due to heavy Supabase client mocking requirements. These are candidates for integration testing.

Stores ~85% statements

File Statements Coverage Description
session-store.ts 100%
Central Zustand store
template-store.ts 75%
Response template store
session-template-store.ts 72%
Session template store
template-editor-store.ts 0%
Template editor state

Test File Inventory

Area Test Files Tests
Pages 4 100
Components 22 175
Hooks 6 37
Libraries 4 62
Stores 3 35
App 1 2
Total 37 ~425