Skip to content

Add unit tests for frontend TypeScript modules#23

Merged
gauthierpiarrette merged 1 commit intomainfrom
test/frontend-phase1
Feb 19, 2026
Merged

Add unit tests for frontend TypeScript modules#23
gauthierpiarrette merged 1 commit intomainfrom
test/frontend-phase1

Conversation

@gauthierpiarrette
Copy link
Owner

What

Add unit tests for the frontend's pure TypeScript modules (ws.ts, ui.ts) and extract
describeReloadDiff from App.svelte into its own tested module. This brings frontend
test count from 29 to 60 with no new dependencies.

Why

The frontend had only one test file (schema.test.ts). The WebSocket client, reload
diffing logic, and clipboard utility had zero coverage. The .gitignore also had a
bug where lib/ was ignoring all frontend/src/lib/ files, preventing new files
from being tracked.

How to test

Run cd frontend && npm test and verify all 60 tests pass.

Checklist

  • uv run task check passes (lint + format + tests)
  • New code has type hints on public functions
  • No dead code or commented-out code added

@gauthierpiarrette gauthierpiarrette merged commit b18376d into main Feb 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant