Operational guide for @askrjs/testing, which owns transport-neutral request
injection and focused browser-harness guidance.
Keep every helper's simulation boundary explicit so a reader knows which real mechanisms it does and does not exercise. Reject invalid requests, redirect state, lifecycle use, and harness configuration with actionable errors. Test redirect, abort, streaming, cleanup, and thrown paths. Keep request injection, browser testing, and real transport testing as visible, non-interchangeable seams. Prefer explicit handlers and requests over hidden globals or matcher magic. Add helpers only for demonstrated application test needs.
Run npm run check before declaring a change ready.
Any change to the version field in package.json, whether a release,
prerelease, or patch bump, must include a matching ## <version> section in
CHANGELOG.md in the same commit or pull request. Date the section and list
breaking changes (with migration notes), deprecations, additions, and fixes.
Move entries from Unreleased into the new version section rather than leaving
them there. If the repository has no CHANGELOG.md yet, create one (Keep a
Changelog style) at the next version bump. Do not publish or tag a version whose
changelog section is missing.
A benchmark number is only half of an optimization's success criterion. The change must also preserve a causal path that a human or agent can narrate in one sentence.
Every benchmark-driven change must include:
- the one-sentence causal description of the optimized path;
- the exact fallback trigger and proof that optimized and fallback paths have identical observable behavior and error surfaces;
- an explicit legibility-cost statement, including
nonewhen no new path or concept is introduced; and - evidence that a measured bottleneck in a real application justifies the optimization now.
Prefer making the existing single path faster. New caches, inference, memoization, shortcuts, fast paths, or scheduler states require an explicit legibility decision; a speedup alone does not justify them.