Generated from TESTING.md · do not edit by hand

Testing

How versions, docs HTML, and unit tests stay in sync.

Version numbers

Root package.json is the source of truth (MAJOR.MINOR.PATCH, for example 0.5.0).

Enable hooks once after clone:

pwsh -File scripts/setup-git-hooks.ps1

Or:

npm run hooks

Markup → HTML

Do not hand-edit docs/*.html or README.html. Edit markdown, then:

npm run docs:html

Open rendered pages in the system browser:

npm run docs:view

CI fails if generated HTML is stale (git diff --exit-code after docs:html).

Unit tests

Vitest covers pure helper logic (Bowl parsers, hours integration, wallet lines, alerts, log timestamps).

npm test

Watch mode:

npm run test:watch --prefix helper

CI

.github/workflows/ci.yml on main / dev:

  1. npm ci (root, helper, web)
  2. npm test
  3. npm run build --prefix web
  4. Regenerate docs HTML and assert no drift