2.1 KiB
2.1 KiB
2026-03-28 Q-004 Coverage Remediation Pass 20
Scope
- Continue strict
Q-004closure work after Pass 19. - Fully close the remaining high-risk storage hotspot in:
frontend/admin/src/lib/storage/token-storage.ts
- Re-verify closure through targeted storage tests and full frontend validation.
Changes
Frontend
- Added dedicated storage coverage in:
frontend/admin/src/lib/storage/token-storage.test.ts
- Newly covered behavior includes:
- in-memory refresh token read/write
- blank and
undefinednormalization tonull - explicit token clearing
- presence checks for the in-memory token
- session presence cookie detection
- the no-
documentfallback branch
Backend
- No backend code changes were required in this pass.
Verified Commands
cd D:\project\frontend\admin
npm.cmd run test:run -- src/lib/storage/token-storage.test.ts
npm.cmd run lint
npm.cmd run build
npm.cmd run test:coverage
Results
Frontend coverage
- Overall:
- statements
92.32% - branches
79.63% - functions
89.70% - lines
92.49%
- statements
- Target area:
src/lib/storage/token-storage.ts: statements100%, branches100%, functions100%, lines100%
Validation outcomes
- Full frontend coverage run now completes with:
50passing test files229passing tests
- The required sequential frontend validation path passed:
test:run -- src/lib/storage/token-storage.test.tslintbuildtest:coverage
Validation Notes
- The successful frontend coverage run still emits one post-summary jsdom
AggregateErrornetwork-noise line.- It does not fail the command.
- It remains a real validation-hygiene issue and cannot be hidden.
Real Conclusion
src/lib/storage/token-storage.tsis no longer an openQ-004gap.Q-004still cannot be honestly declared closed.- After this pass, the remaining higher-value frontend gaps narrow further to:
src/lib/errors/AppError.tssrc/pages/admin/ImportExportPage/ImportExportPage.tsxsrc/pages/NotFoundPage/NotFoundPage.tsx- the post-summary jsdom
AggregateErrorcoverage-noise hygiene issue