Use when writing, running, or reviewing tests: naming by requirement ID, test kinds per work item type, and what counts as weakening a test.
Testing¶
- Framework: the project's test framework (see
AGENTS.md). Files are the framework's test file pattern, intests/for packages. - Every test name carries the requirement ID it covers, e.g.
it("AUTH-012: rejects an expired token", ...). - Each test asserts the requirement's behaviour. A test that only runs code is not a test.
Kinds¶
- Feature: requirement tests. They must fail before the implementation.
- Bug: a regression test that fails on the bug.
- Refactor: characterization tests that pin current behaviour.
- App
[ux]: tests through the rendered UI, using role, label, and keyboard queries.
Rules¶
- Tests are deterministic and independent of each other.
- Never weaken, skip, or delete a test to make it pass. Report a wrong test instead.
- Only the test writer edits tests. Implementers do not.
- Run
check(dev-tools) withfilter: "<pkg>". Use thetesttool withfilesandnamefor one test.