Repository navigation
Testing guide
VectoDE edited this page Oct 28, 2026
·
2 revisions
This page lists what is tested and with which tool. The unit tests, the build checks and the policy checks exist today. The rest is added with the stage that builds the thing under test.
- Unit tests with the Node test runner, in
tests/unit. Run them withnpm test. They cover the build (content reading, Markdown, demo files, support extraction, rendering, output files and the coverage check), the policy checks, the release helpers and the wiki link check.npm run test:coveragefails below 80 percent for lines, branches and functions. - Policy checks, run with
npm run policy. They check the workflow files, line endings, forbidden text in tracked files and links between wiki pages. - The
dcoworkflow on pull requests checks the sign-off and forbidden text in every commit message, and forbidden text in the pull request title and body. - Formatting with Prettier, run with
npm run format:check, and ESLint, run withnpm run lint:js. - The build and the coverage check run in the CI job
build. Build tests use fixtures made in memory or in a temporary folder, never.htmlfiles in the repository. - CodeQL and the OpenSSF Scorecard run in GitHub Actions.
Still planned:
| Area | Tool | Stage |
|---|---|---|
| Editor |
node:test, fake IndexedDB |
3 |
| Shell and demos | Playwright in Chromium, Firefox and WebKit | 3 to 5 |
| Accessibility | axe-core inside Playwright | 3 |
| Performance | Lighthouse CI | 3 |
| Worker | Vitest with the Workers pool or Miniflare | 4 |
| Links | Weekly link check | 4 |
- Navigation, the command palette and the theme switch work.
- The editor edits, copies, resets, shares and downloads.
- Every demo loads and runs without console errors or CSP violations, and shows its fallback where the API is unsupported.
- Permission demos never prompt on load.
- Demos marked
runsIn: windowopen on the preview origin, and the in-frame view shows the fallback. - Demos still work through their simulation when the Worker is blocked.
- No page scrolls horizontally at 375 px.
- Code in a preview can read neither the shell's IndexedDB nor its caches.
- The runner ignores messages from foreign origins.
- The shell's CSP blocks frames from any other origin.
Echo, SSE and WebSocket behaviour, rate limiting, the CORS allow-list and the rule that nothing is stored. After each deploy a smoke test calls the live Worker.
See Accessibility guidelines for the accessibility checks and Security model for the boundaries the isolation tests protect.
HTML-Template is licensed under the MIT License. Repository · Issues · Discussions