Home

dev / openkara

publicthedavidweng/OpenKara· sync paused
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

test: replace source-text assertions with the behaviour they stood in for (#279)

2 months ago

4e3bb64
Authored
Davy7/26/2026, 11:16:04 PM
Four tests asserted that a source file contains certain identifiers.
That passes whether or not the code runs, breaks on a rename that
changes nothing, and in two cases restated what a real test in the same
file already proved.

- shell-entry-parity.test.ts guarded against a sidebar-webview split
  shell. Those identifiers appear nowhere in src/ except in the two
  tests looking for them, so the test only proved its own strings
  existed. Deleted.
- The app-runtime "exports a single gated hook graph" test greps for
  twelve identifiers. Deleted; the two behavioural tests in that file
  stay.
- use-playback-runtime's playback-position grep duplicated the real
  test at :321 that fires the event and asserts the store call. Deleted.
- use-playback-runtime's upload-event grep had no behavioural
  counterpart, so deleting it would have lost coverage. Replaced with a
  test that fires upload-progress and upload-error through the mocked
  listener and asserts the store transitions and the error toast.

Kept the source-scanning tests that are doing real work: the locale
completeness scan, which catches keys missing from every locale (#209),
and the ordering guards in the CDG and paging hooks, which pin race
conditions a behavioural test cannot easily reach.

Parent26f9327

3 files changed
  • src/hooks/use-playback-runtime.test.tsx+33−13
  • src/runtime/app-runtime.test.ts+0−20
  • src/shell-entry-parity.test.ts+0−13