No unit tests for the page's own functions #234
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The page's TypeScript (web/src, about 2,900 lines) is checked by tsc, page-smoke.js (it loads), native-bridge.js and the Playwright suite, which needs a daemon, Caddy and Chromium. Its pure helpers (esc, clock, mb, ago, due, spanText, initials, kindOf, entryName, the directory's sorts, splitWords, mediaSrc) are tested only through the browser. A node:test file loading the built script into tests/dom-stub.js would test them in a second, with no new dependency.
Added in
f20660a: node --test tests/page-unit.js, 14 tests of the page's helpers against the built script, in under a second; listed in CLAUDE.md beside the other page checks.