Skip to content

Testing and quality

Terminal window
pnpm test # vitest run

The 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
Terminal window
pnpm lint # biome check apps/web/src apps/web/tests
pnpm lint:fix # apply safe fixes
pnpm format # biome format --write apps/web/src apps/web/tests

Rules live in the root biome.jsonc.

Terminal window
pnpm build # tsc && vite build (apps/web)
cargo check --manifest-path apps/desktop/src-tauri/Cargo.toml
Terminal window
python -m unittest discover -s scripts/tiles -p "test_*.py" # schema unit tests
python scripts/tiles/pipeline.py --check # manifest + tile spot check

test_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.
Terminal window
pnpm docs:build

Starlight fails the build on broken sidebar links and invalid frontmatter, so run this before committing docs changes.