Testing
Checks
npm run typecheck
npm test # vitest: unit tests and jsdom UI tests
npm run buildThe jsdom UI tests cover the safety-relevant behaviour: the E-stop flow and its confirmation, confirmation dialogs, and permission handling. Unit tests cover the REST and WebSocket clients, token storage and derived status.
End-to-end
Against a running stack — ratavyr plus the engine with its virtual MCU and robot-profiles/single-axis-virtual.toml — using the app's own REST and WebSocket clients:
MOTIONCORE_E2E_URL=http://127.0.0.1:8080 \
MOTIONCORE_E2E_OPERATOR_TOKEN=... \
MOTIONCORE_E2E_VIEWER_TOKEN=... \
npx vitest run src/e2eratavyr must be started with the same operator and viewer tokens. See ratavyr: getting started and motioncore: quick start.
CI
.github/workflows/ci.yml runs typecheck, tests and build, and the end-to-end test against freshly built motioncore and ratavyr (checked out from bzy-logics).
.github/workflows/docs.yml builds this documentation site and deploys it to GitHub Pages.