Stop excluding test files from CMS typecheck
Problem¶
apps/cms/tsconfig.json excludes test/spec files from typecheck. This diverges from LMS (which types its tests) and means typos in fixtures or assertion helpers are only caught at test runtime.
Proposal¶
- Remove the test-file
excludeentries fromapps/cms/tsconfig.json. - Run
npm run typecheck --workspace apps/cmsand fix the fallout. Expected fixes:- Missing types on fixture builders.
any-typed mocks tightened to the real shape.
- Where a test genuinely needs to bypass a type (e.g. constructing a partial DB row for a specific assertion), use
satisfiesplus a local helper rather thanas any.
Acceptance criteria¶
- CMS
tsconfig.jsonno longer excludes*.test.*/*.spec.*/__tests__/**. -
npm run typecheckis green for CMS. - No new
// @ts-ignore/as anyintroduced (rg sweep clean vs baseline). -
npm run checkpasses.
Out of scope¶
- Restructuring test layouts (
__tests__/vs co-located). - Enabling
noUncheckedIndexedAccess(covered by T-007).
Notes / decisions log¶
- 2026-05-24: Ticket created from monorepo audit.
- 2026-05-25: Delivered in the same change set as T-007 (bundled per execution decision). Test fallout fixed with shared helpers and
.at()/guard patterns across stores, hooks, e2e specs, and widget tests.