Tracked task list for achieving a green test suite, meaningful coverage, and robust CI before JOSS submission.
Last updated: 2026-02-27
- File:
src/test/api/client.v1.3.test.ts - Root cause:
APIClientrewriteslocalhost→127.0.0.1but tests assertedlocalhostURLs.isValidToken()rejectstest-token. - Fix: Used
http://127.0.0.1:18011constant,va_test12345678token format, mocked localStorage for consistent URL/token. - Fix URL assertions
- Fix token format
- File:
src/lib/errorHandling.ts(source fix) - Root cause:
parseApiError()had inline Zod parsing that bypassedparseErrorEnvelope(), leavingfieldErrorsunpopulated. - Fix: Restored delegation to
parseErrorEnvelope()in the Zod success branch. - Align source for
fieldErrorshandling - Align source for field-prefixed message format
- File:
src/test/components/TokenStatusIndicator.test.tsx(complete rewrite) - File:
src/test/integration/errorHandling.test.tsx - Root cause: Tests rendered inline stub components instead of real ones.
- Fix (TokenStatusIndicator): Rewrote to import real component, mock
useTokenStatus()anduseServerCapabilitiesContext()hooks. - Fix (errorHandling): Added try/catch +
parseApiError()+ state management in test component. - Rewrite TokenStatusIndicator tests against real component
- Fix errorHandling integration test component
- File:
src/test/integration/config-validation.test.tsx - File:
src/test/components/ServerDiagnostics.test.tsx - File:
src/test/integration/serverDiagnostics.test.tsx - Root cause:
vi.useFakeTimers()frozewaitFor()polling. Text assertions didn't match actual component output. - Fix: Added
shouldAdvanceTime: trueto fake timers,advanceTimersto userEvent setup, updated text matchers, fixed stale data tests withmockRejectedValue, usedgetAllByText/getAllByRolefor multiple matches. - Fix config-validation timer deadlocks
- Fix ServerDiagnostics component timer deadlocks + text mismatches
- Fix serverDiagnostics integration timer deadlocks + text mismatches
- File:
src/test/pipeline-integration.test.tsx - File:
src/test/integration/job-cancellation.test.tsx - File:
src/test/integration/authentication.test.tsx - Root cause:
isLoadingfalse whenenabled: false,showErrorToast()uses{ title: 'Error' }not{ title: 'Cancellation failed' }, test component didn't use localStorage. - Fix (pipeline): Changed
isLoadingassertion tofalse, passed{ enabled: true }, replacedsetTimeout(0)withwaitFor. - Fix (job-cancellation): Updated toast assertion to use
expect.objectContaining({ title: 'Error' }). - Fix (authentication): Added localStorage read/write to test component, used controlled promise for loading state, spied on
localStoragedirectly instead ofStorage.prototype. - Fix pipeline integration test defaults
- Fix job-cancellation toast assertion
- Fix authentication localStorage and async timing
- Fix: Added
bun run buildstep after lint, before tests in CI workflow. - Add build step to
.github/workflows/tests.yml
- Fix: Removed
continue-on-error: truefrom coverage step. Mergedtest:runandtest:coverageinto single step. E2e/lighthouse keepcontinue-on-error(supplementary). - Update
.github/workflows/tests.yml
- Fix: Added thresholds to
vitest.config.ts: 20% statements, 15% branches, 17% functions, 20% lines. Current coverage: 22/19/20/23 — thresholds act as regression guard. - Configure coverage thresholds in
vitest.config.ts
- Nice-to-have: Test on multiple Node/Bun versions for broader compatibility signaling.
- Evaluate adding Node 18/20 matrix to CI
- Add
coco.test.ts— 27 tests: parsing, grouping, keypoints, bounding boxes, validation, track statistics - Add
face.test.ts— 29 tests: parsing, metadata, emotions, timeline, validation - Add
openface3Parser.test.ts(lower priority — OpenFace3 is less commonly used)
- Add
formatters.test.ts— 20 tests: uptime formatting, memory formatting, status colors - Add
validation.test.ts— 36 tests: COCO/WebVTT/RTTM/Scene validation, file types, VideoAnnotator format detection
src/hooks/useTokenStatus.ts— Token status managementsrc/hooks/useServerCapabilities.ts— Server capability detectionsrc/hooks/useSystemHealth.ts— System health monitoring- Add tests for critical hooks
src/contexts/ServerCapabilitiesContext.tsx/ServerCapabilitiesProvider.tsx- Add ServerCapabilities context tests
- Current state: Single test — checks page title loads.
- Target: Cover main user flows:
- Load demo dataset and verify viewer renders
- Upload a file via drag-and-drop
- Navigate between pages (Dashboard, Library, Create)
- Verify Codecov token is configured in GitHub repo secrets
- Add coverage badge to README if not present
- Ensure CI status badge in README points to correct workflow
Fix 52 failing tests (Sections 1A–1E) — reviewer will run testsDONEAdd build step to CI (Section 2A) — proves the app compilesDONERemove continue-on-error from coverage (Section 2B) — ensures green CI means green testsDONEAdd parser tests (Section 3A) — core contribution of the projectDONEAdd utility tests (Section 3B) — easy coverage winsDONECoverage threshold (Section 2C) — prevent regressionsDONE- E2E expansion (Section 4A) — nice-to-have
- Badges & docs (Section 5) — nice-to-have