Test Suite

Repo-side checks for deterministic authoring, schema-backed performance mode, transport adapters, and browser demos.

Fast Checks

# Run the fast static/public docs gate
npx vitest run tests/public-docs-current-authoring.test.js

# Run all repo tests
npm test

The public docs gate fails if the docs make the old hosted dev tree the primary path, omit V0.2/V0.3 performance mode, omit current demo links, or blur authoring APIs with runtime bus/worker infrastructure.

Focused Performance-Mode Tests

Browser Demo Checks

Use Playwright for the current Pac-Man demos. The world-facade Trystero demo is the release-facing browser path.

# Local server defaults are configured in playwright.config.js
npx playwright test tests/e2e/pacman-trystero-join.spec.js

# Smoke a deployed world-facade demo
EM_V02_LOCAL_BASE=https://libs.letsinspire.com/em-pacman-v02-world-trystero/ npx playwright test tests/e2e/pacman-trystero-join.spec.js

Advanced diagnostic live page: https://libs.letsinspire.com/em-pacman-v03-worker-trystero/. Use worker and time-sliced proof URLs for runtime diagnostics only; they are not the first-path tutorial material.

What These Tests Protect

AreaRisk
defineGameGame modules accidentally gain host, network, or class-constructor assumptions.
Schema-backed performance modeCanonical state leaks class instances or non-structured-clone data.
ctx.world()Authoring code bypasses routed input or backend-owned rollback.
Render mirrorRenderer becomes authoritative or reads live backend internals.
Trystero transportBrowser P2P behavior drifts from the transport interface.
V0.3 buses/workersRuntime infrastructure is mistaken for a separate gameplay API.