Skip to content

Testing

SuiteCommandWhat it covers
Backend unitdeno task test230+ tests — OMS validation, algo slicing, FIX parsing, analytics, grid filtering
Frontend unitcd frontend && npm run test:unit797+ tests — Redux slices, components, panel registry, layout models, hooks
Frontend coveragecd frontend && npm run test:coverageSame tests with v8 coverage reporting
Integrationdeno task test:integrationEnd-to-end order flow, algo fill rates, intelligence pipeline, journal HTTP
Smokedeno task test:smoke87+ tests — all service health checks, OAuth flow, order lifecycle, risk-engine
Playwright E2Ecd frontend && npx playwright test89+ tests — auth, orders, market data, FI, algo, session replay, observability
Electron E2Ecd frontend && npm run test:electronDesktop app — window, startup, contextBridge, pop-out

Coverage is generated on every push to main:

  • Frontend: v8 provider via Vitest, reports as text-summary, lcov, and json-summary
  • Backend: Deno native --coverage flag, exported as lcov
  • Badge: auto-committed to docs/badges/coverage.json and displayed in the README
lint-and-test ─┬──→ integration (15 min, independent)
├──→ docker-base → docker-services
frontend ──────┼──→ playwright-ui (5 min, parallel)
├──→ screenshots (1.5 min, parallel)
└──→ electron (6 min, parallel)

Playwright, screenshots, Electron, and Docker all run in parallel with integration tests (not blocked by them).

Use Deno’s built-in test runner. Import timeout() from test-helpers.ts for HTTP timeouts.

import { assertEquals } from "https://deno.land/std@0.210.0/testing/asserts.ts";
import { timeout } from "./test-helpers.ts";
Deno.test("[service] endpoint returns expected data", async () => {
const res = await fetch("http://localhost:5032/health", { signal: timeout() });
assertEquals(res.status, 200);
});

Use Vitest + React Testing Library. Follow the pattern in src/components/__tests__/.

Use the AppPage helper and GatewayMock for mocked backend interactions. Auth fixtures in tests/helpers/authFixtures.ts.