You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Content module has no tests: page, banner, FAQ, and legal CRUD is uncovered
Labels / Complexity: testing · Medium Complexity — Medium
Problem
src/content/ (3 files, 0 *.spec.ts) implements page, banner, FAQ, and legal content management — currently entirely in-memory (src/content/content.service.ts). There are no tests for any of the CRUD paths, so nothing pins the current behavior before the durability migration (#51) lands. Combined with the unauthenticated write routes (#39), this module is both untested and unauthenticated.
Why this is architecturally hard
Tests must pin behavior that is about to change. The in-memory semantics (identity via Date.now(), array ordering) need tests written against the durable contract so the migration in Caching stradedy #51 cannot silently change them.
Content module has no tests: page, banner, FAQ, and legal CRUD is uncovered
Labels / Complexity: testing · Medium Complexity — Medium
Problem
src/content/(3 files, 0*.spec.ts) implements page, banner, FAQ, and legal content management — currently entirely in-memory (src/content/content.service.ts). There are no tests for any of the CRUD paths, so nothing pins the current behavior before the durability migration (#51) lands. Combined with the unauthenticated write routes (#39), this module is both untested and unauthenticated.Why this is architecturally hard
Date.now(), array ordering) need tests written against the durable contract so the migration in Caching stradedy #51 cannot silently change them.Acceptance criteria
npm test.npm run test:cov).Out of scope
Making content durable (#51); adding auth (#39).
Getting started
src/content/content.service.ts— the CRUD to coversrc/content/content.controller.ts— the routesCommands:
npm test,npm run test:cov.Good first files to read:
src/content/content.service.ts,src/content/content.controller.ts.