Watch
0
0
Fork
You've already forked hyperhive
0

frontend: root test and typecheck scripts, and tests for the review runs wording and the terminal drag

npm test and npm run typecheck now run in every workspace that has them (the repo root had only build and clean). New tests cover RunsTypes (labels and tones for every outcome, the classification count) and termDrag (what a drag carries and how the hover reads it). instructions.ts cannot be imported by a test under Node because of its .js specifier for unified-diff.ts, so it is not covered, and the conventions doc says so.
This commit is contained in:
iris 2026-11-19 19:01:47 +01:00 • committed by mara
commit e4cfac6926

View file

@ -470,6 +470,13 @@ nix fmt # treefmt — authoritative, NOT bare cargo fmt
misses the non-rust files treefmt also covers, so always run `nix
fmt` before pushing. It also formats and lints Python with ruff.
**Frontend checks** run from `frontend/`: `npm test` runs the unit tests of every
workspace that has any (today the swarm UI's, with Node's own runner), and
`npm run typecheck` runs `tsc` in each that has a typecheck. Build with
`npm run build`. Pure logic goes in a `.ts` module that a test imports directly. A test
under Node can't import a module that names a sibling with a `.js` specifier, as the
build resolves it.
**Clippy discipline — never add `#[allow(clippy::…)]`.** All lints are
CI-fatal at `-D warnings` (pedantic included); every warning that fires
must be *fixed*, not silenced. Common patterns: