Testing
The test layers, the command for each, and what hosted CI does and does not run.
| Layer | Command | Notes |
|---|---|---|
| TypeScript type check | npm run typecheck | all workspaces, including this docs app |
| SDK tests | npm test --workspace tobin-mvp1-sdk | node:test; use the bridge to avoid skips |
| Console unit, integration, security and persistence tests | npm test --workspace tobin-web-console | real SQLite; bridge-backed tests are skipped without TOBIN_BRIDGE_EXE |
| Contract tests | cd contracts && cargo test --locked --workspace | also run against Wasm in the integration workflow |
| Release-scan rule tests | node --test scripts/release/scan.test.mjs | the source-tree scan behind gate G09 |
| Documentation checks | npm run validate --workspace tobin-docs | links, images, navigation and frontmatter of this docs site |
| Browser journeys | from apps/web-console: TOBIN_WIDTH=1200 node test/browser/<journey>.mjs <output dir> | needs a production build; run at 1200 and 420 |
The browser journeys are journey, w0-journey, sessions-journey, settlement-journey, authorization-journey,
clearing-journey, backend-journey and wallet-auth-journey.
Skipped tests
Without TOBIN_BRIDGE_EXE, tests that need the Rust bridge are skipped, not passed. Report skips alongside passes;
a pull request must state them.
Hosted CI is not local validation
On pull requests, hosted CI runs formatting, Rust tests, the type check, both production builds, the SDK and console suites with the bridge, the dependency-baseline and link checks, the scan tests, and the W0 browser journey. Most other browser journeys are not run on pull requests, so run the ones your change affects locally.
What a test proves
A passing test proves only what it asserts. Most of the evidence in this repository is same-author. When you add a test, add the case that would have caught the defect, and never weaken a test to make broken code pass.
Canonical test records:
MVP-1 test plan,
wallet-first validation record,
and ci/README.md.