Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 2.87 KB

testing.md

File metadata and controls

51 lines (39 loc) · 2.87 KB

Testing

The test inventory, how to run it, and what it does not cover. Results of a given session are in verification.md.

Commands

All from this capsule root (see AGENTS.md "Commands"):

node scripts/pnpm.mjs run typecheck
node scripts/pnpm.mjs run lint
node scripts/pnpm.mjs run test
node scripts/pnpm.mjs run build
node scripts/pnpm.mjs run deploy:dry-run
node scripts/pnpm.mjs run test:e2e      # needs Chrome; PLAYWRIGHT_BASE_URL or a dev server

Unit tests (node:test)

test runs every components/**/*.test.mjs and app/**/*.test.mjs. Tested modules are leaves with no runtime relative imports.

File Pins
timeline.test.mjs Phase-to-time mapping, chapter labels, dwell, film/morph clocks, legacy beats, camera
film.test.mjs Frame index/URLs, every frame present on disk, nearest-loaded fallback, fetch order
morph.test.mjs, face.test.mjs Face region, dissolve front, glyph crop, face growth order
morphology.test.mjs, constellation.test.mjs Neuron tree shape, vertex budget, constellation seats
signal.test.mjs, handoff.test.mjs, tactile.test.mjs Activity cycle, carrier handoff, pointer placement
app/api/vera/chat/limit.test.mjs Daily limit with TTL, hashed IP only, fallback when store is down or absent
app/env-contract.test.mjs Every variable the site reads is in .env.example with no secret value; .gitignore blocks env files, databases, dumps and keys
app/secret-scan.test.mjs scripts/secret-scan.mjs run for real in a temporary Git repository: 12 tests: tokens and provider keys, private keys, URLs with a password, filled secrets (also short, letters-only and lower-case), database dumps, env files, key files, databases and data exports are refused and never echoed; placeholders, templates, hashes and marked examples pass; the allow file must be tracked and exact; UTF-16 text is read and unread files are named; --staged reads only the index

End-to-end (Playwright, Chromium)

e2e/smoke.spec.ts (4 tests: landmark, way on to the ecosystem, robots and JSON-LD, logo and icon) and e2e/neural.spec.ts (film, reduced motion, mobile, WebGL/canvas fallbacks, no-JS, carrier, progress trace, text-size floor, SentraSquad and more). Run locally against a build; CI does not run them (Gaffer, 2026-10-09).

Gaps

  • route.ts itself has no automated test: 400/413/429/500/502 paths were checked by hand on 2026-10-11 (.agents/HANDOFF.md). A live Dify answer is never part of the suite.
  • VeraNeuralWidget.tsx has no unit or e2e test.
  • Frame timings are local evidence, not 60 fps on every GPU; INP comes from field data after a deploy; Safari/iOS devices are a separate release check.
  • deploy:dry-run checks an empty server-only list; see security.md.

Capsule topology from the enclosing repository: python tools/safrs/check_topology.py.