Testing and quality
Frontend tests (Vitest)
Section titled “Frontend tests (Vitest)”pnpm test # vitest runThe suites live in the web package. Configuration is in apps/web/vite.config.ts. It uses
the jsdom environment, the tests/setup.ts setup file, and runs tests/**/*.test.{ts,tsx}
(paths relative to apps/web). Component tests use Testing Library. axe-core is available
for accessibility assertions.
| Suite | Covers |
|---|---|
tests/features/map/map.test.tsx |
Map layer bindings, scale and tile-path helpers |
tests/features/panels/panels.test.tsx |
Panel content and the manifest contract |
tests/features/shell/shell.test.tsx |
AppShell layout |
tests/features/timeline/playback.test.ts |
nextDate and the playback store |
tests/shared/utils/dates.test.ts |
Period resolution and sorting helpers |
tests/shared/utils/colorScales.test.ts |
Gradients from ramps and classes |
tests/shared/utils/geo.test.ts |
Geo helpers |
tests/shared-ui/primitives-states.test.tsx |
States of every primitive: Button, IconButton, Checkbox, Slider, Switch, SegmentedControl, Panel, StatusPill, Badge, Progress, Tooltip, Popover |
tests/shared-ui/panel.test.tsx, slider.test.tsx, switch.test.tsx |
Focused behaviour of those primitives |
Lint and format (Biome)
Section titled “Lint and format (Biome)”pnpm lint # biome check apps/web/src apps/web/testspnpm lint:fix # apply safe fixespnpm format # biome format --write apps/web/src apps/web/testsRules live in the root biome.jsonc.
Type-check and build
Section titled “Type-check and build”pnpm build # tsc && vite build (apps/web)cargo check --manifest-path apps/desktop/src-tauri/Cargo.tomlPipeline validation
Section titled “Pipeline validation”python -m unittest discover -s scripts/tiles -p "test_*.py" # schema unit testspython scripts/tiles/pipeline.py --check # manifest + tile spot checktest_manifest_schema.py covers the validator’s edge cases. Examples:
- A minimal manifest passes.
- Pair-product periods (
… (vs …)) are allowed. - Percent-encoded tile paths are rejected.
- Tile paths with spaces are rejected.
- Tile paths naming another layer id are rejected.
Documentation build
Section titled “Documentation build”pnpm docs:buildStarlight fails the build on broken sidebar links and invalid frontmatter, so run this before committing docs changes.
