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.jsdefines the environment (jsdom)jest.setup.jsloads@testing-library/jest-domts-jesthandles TypeScript transformstestMatchis 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