No unit tests for the page's own functions #234

Closed
opened 2026-10-14 08:46:37 -07:00 by rays · 1 comment
Owner

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.

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.
rays added the enhancement label 2026-10-14 08:46:37 -07:00
Author
Owner

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.

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.
rays closed this issue 2026-10-14 08:47:17 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rays/ipx#234