Skip to content

Test Suite Overview

This page maps the full tests/ directory: what exists, what each test validates, and how to run everything.

Test Categories

CategoryLocationPurpose
Pre-build gatetests/pre-build.test.mjsOrchestrates release-critical checks before publish.
Axiomstests/axioms.test.tsVerifies invariants (stealth roots, hash-chain, LWW, pointers, operators).
Phasestests/phases.test.jsEnd-to-end fire tests for feature phases 0-8.
Build compatibilitytests/Builds/*Ensures CJS/ESM/UMD outputs behave correctly.
DSL contractstests/contracts/dsl.contract.test.mjsContract suite for selector/filter/broadcast/query behavior.
Benchmarkstests/Benchmarks/*Performance and complexity characterization.
Demostests/Demos/*, tests/sand.tsPractical usage walkthroughs and exploratory scripts.

Run Commands

CommandWhat It Runs
npm run test:prebuildBuild + Axioms + Phases + CJS/ESM/TS/UMD checks
npm run test:contractsDSL contract suite
npm run test:tsType-check (tsc --noEmit)
npm run test:umdUMD runtime compatibility test

You can also run files directly:

bash
node tests/axioms.test.ts
node tests/phases.test.js
node tests/contracts/dsl.contract.test.mjs
node tests/Benchmarks/benchmark.11.secret-push-vs-pull.test.ts

Suggested CI Order

  1. npm run test:prebuild
  2. npm run test:contracts
  3. Optional nightly: selected benchmarks + regression gate