__tests__/ folder beside it (ADR 0022). The test’s tier is set by its
file-name infix (ADR 0182). This page is the file-kind to test table. The data behind it is KIND_FOLDERS, ROOT_MODULE and
TEST_TIERS in tools/scripts/structure.mjs. The two must match: if this table and the script disagree, the script is right and this
page is stale. The generated repository structure page carries the same table.
Test name
A test for a subject is<subject> + the tier infix + .ts. The subject keeps its kind suffix, so refund.action.ts is tested by
refund.action.test.ts in the same folder’s __tests__/.
File kind to test
“none” means the script requires no test for that kind. A file of that kind can still have one.
Rules that cross the table
- A component is a folder
x/{x.tsx, index.ts, __tests__/x.test.tsx}(ADR 0128); its test isx.test.tsx, not a tier infix. - A file in a kind folder with no suffix (
ai/,raw/,decorators/,components/) takes the test of its folder. .contractis the test tier only. A schema file is<name>.schema.ts(ADR 0006), so.contractnever names a source file.- The validator checks that a kind’s test exists (
checkTestForKind, planned under STA-220). Until it lands, the table is a rule without a check, and the scaffold (pnpm new) is the only place that writes the test.