Testing Framework

Juno uses Jest for unit and snapshot testing. Test coverage is focused on pure functions, UI rendering, and signal logic — not end-to-end flows.


Structure

Test files live in:

/tests/

And colocated *.test.ts(x) files inside component folders.

Tests cover:

  • Utility functions (formatUsd, truncateAddress, timeAgo, etc)

  • Signal generation logic (generateSignal, scoreConfidence)

  • Component render stability (e.g. WalletTokenTable, SignalFeed)

  • Snapshot diffs for key UI components


Setup

  • jest.config.js defines the environment (jsdom)

  • jest.setup.js loads @testing-library/jest-dom

  • ts-jest handles TypeScript transforms

  • testMatch is scoped to /tests/**/*.test.(ts|tsx)

No mocks unless needed. No global test data. Tests are atomic and reproducible. If it breaks, you’ll see exactly where.


Tests are lightweight, fast, and intended to catch regressions on render or logic. No need for full-blown browser automation, this stays focused.

Last updated