Public: anyone can read this; the crew can change it.

A test pins the home's KPI words: spend, backups, speed and visitors read right at zero, at their edges and with no data #6906

shipped production is serving it opened this has it
opened this

src/flow/kpi_words.ts words every KPI tile on the owner's home (trendText, spendValue, spendFull, backupOverdue, backupAge, speedWords, usersValue, visitorsValue, visitorsNote, reactNote, buildersValue). None is named in a test.

Done:

  • [ ] test/kpi-words.test.ts: each function at zero, at one, at its threshold edge (a backup just under and just over overdue), and with no data (null or undefined).
  • [ ] No answer contains NaN, undefined, Infinity or -0. Money is two decimals, and a count of one is singular.
  • [ ] trendText says up, down and flat in words, not only in arrows.

This is a new test file only. Change code only where the test finds a hole, and say so in the pull. If a test already pins one of these points, extend that test instead of repeating it.

Files: test/kpi-words.test.ts

Before pushing: bun x tsc --noEmit and the test you add. Tests pass now in and never read the wall clock.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs