Test Each Public Fn
Any function or method exported from a module must have at least one corresponding test case.…
$ aoe install @team/rule-test-each-public-fn Projection
Always in _index.xml · the agent never has to ask for this.
TestEachPublicFn [rule] v1.0.0
Any function or method exported from a module must have at least one corresponding test case. This is not 100% branch coverage — it is a baseline reachability requirement: every public contract must be exercised by at least one test.
Loaded when retrieval picks the atom as adjacent / supporting.
TestEachPublicFn [rule] v1.0.0
Any function or method exported from a module must have at least one corresponding test case. This is not 100% branch coverage — it is a baseline reachability requirement: every public contract must be exercised by at least one test.
Checks
- CI fails if a new exported function has zero test coverage (tracked by the coverage map).
- The test must call the function — not just import it.
- At minimum: one happy-path test. Edge cases (null input, boundary values) are expected but not enforced by this rule.
- React components: at least one render test (
screen.getByRoleor similar).
Label
Every exported function must have at least one test
Loaded when retrieval picks the atom as a focal / direct hit.
TestEachPublicFn [rule] v1.0.0
Any function or method exported from a module must have at least one corresponding test case. This is not 100% branch coverage — it is a baseline reachability requirement: every public contract must be exercised by at least one test.
Checks
- CI fails if a new exported function has zero test coverage (tracked by the coverage map).
- The test must call the function — not just import it.
- At minimum: one happy-path test. Edge cases (null input, boundary values) are expected but not enforced by this rule.
- React components: at least one render test (
screen.getByRoleor similar).
Label
Every exported function must have at least one test
Relations
related: [@team/rule-explicit-return-types, @team/pattern-result-type-over-throw, @team/anti-pattern-comment-explaining-bad-code] enhances: [@team/principle-readability-over-cleverness]
Label
Every exported function must have at least one test
Enhances
- @team/principle-readability-over-cleverness
Source
aoe-engine/examples/coding-style/primes/compiled/@team/rule-test-each-public-fn/atom.yaml