Skip to main content

Tests, checks and hooks

All commands run from medbrains/.

Tests​

CommandRuns
make test-unitRust unit tests that need no database
make test-rustAll Rust tests
make test-tsTypeScript unit tests (Vitest)
make test-e2ePlaywright end-to-end journeys
make test-allRust and TypeScript tests

Static checks​

CommandChecks
make check-allAbout 55 static checks: API contract, UI coverage, types, RLS, permissions and more
make check-apiEvery client method has a route, and every route a client method
make check-permissionsThe TypeScript permission catalogue matches the Rust constants
make check-docsEvery function this branch adds or changes has a doc comment
make lintBiome lint and format check
make gateThe strict pre-merge gate

The ratchets and quality gates page lists the checks that only ever allow things to get better.

Hooks​

note

There is no make hooks target yet. The migration hook in medbrains/.githooks/pre-commit-migrations.sh lints migration headers and row-level security on staged migrations. Install it with git config core.hooksPath .githooks.

Contributors using Claude Code get the versioned hooks in .claude/settings.json, which run each edited file's fast checks.