Skip to content

Testing ​

SuiteCommandCovers
Backend unit and end-to-endpnpm test:nativeEvery API module, the gateway, the file service, encryption, security sweeps
Web unitpnpm --filter @subspace/web testComponents and client logic
Browserpnpm test:uiThe real app in Chromium on an isolated copy of the stack (port 4173): accounts, messaging, search, link previews, calls, encryption, files, cloud drives, passkeys, email, settings, moderation
Live smokeLIVE_URL=https://… pnpm test:liveA deployed instance through its public domain
Desktopcargo test --manifest-path apps/desktop/src-tauri/Cargo.tomlAddress and navigation rules of the desktop shell
Mobilepnpm --filter @subspace/mobile test and typecheckThe mobile shell's helpers and types
Docspnpm --filter @subspace/docs buildThis site; fails on broken internal links

The browser suite's stack ​

pnpm test:ui starts (or reuses) node scripts/native/dev.mjs --test-stack:

  • the test database and Redis database 1;
  • the web app on port 4173 and the services on 4001-4003;
  • real MinIO and LiveKit.

Global setup also starts local stand-ins for outside services:

  • a mock of Google Drive, OneDrive and Dropbox (tests/support/mock-drives.ts);
  • an SMTP sink that keeps every email (tests/support/mail-sink.ts).

Voice and video tests use Chromium's fake camera and microphone over real WebRTC. Encrypted-call tests prove the key exchange worked by decoding the other side's video.

The security sweeps ​

tests/e2e/security-route-coverage.test.ts sends every registered route anonymous, alg=none, wrong-secret, expired and wrong-type tokens, and expects 401. It also fuzzes the public routes and fails on any server error. A new route cannot ship without passing it, or without a reason on the public list.

A transmission from NWD.