This repository uses a layered test stack:
- Backend/unit/integration:
cargo-nextest - Coverage gate:
cargo-llvm-cov - UI Rust-to-WASM tests:
wasm-pack+wasm-bindgen-test - Browser E2E: Playwright
- Dependency security:
cargo-audit+cargo-deny
rustup target add wasm32-unknown-unknown
cargo install cargo-nextest cargo-llvm-cov wasm-pack trunk
npm install
npx playwright install chromium# Backend tests + line coverage gate (default: 70%)
./scripts/test-rust.sh
# WASM UI tests (runs ui/tests/*.rs in Node)
./scripts/test-wasm-ui.sh
# Browser E2E tests
./scripts/test-e2e.sh
# Full suite
./scripts/test-all.shSet a stricter coverage gate locally:
COVERAGE_MIN_LINES=75 ./scripts/test-rust.sh- Write a failing test in the right layer first:
- backend behavior:
tests/*.rsor module#[cfg(test)] - UI parser/transform logic:
ui/tests/*.rswith#[wasm_bindgen_test] - full user flow:
e2e/*.spec.ts
- backend behavior:
- Run the smallest relevant command.
- Implement the behavior.
- Re-run targeted tests.
- Run
./scripts/test-all.shbefore merging.
GitHub Actions workflow: .github/workflows/test-suite.yml
Jobs:
rust-tests: nextest + coverage gatesecurity: cargo-audit + cargo-denywasm-ui-tests: wasm-pack testse2e-tests: Playwright E2E against the real gateway + embedded UI