test(breadcrumbs): assert strict null on non-exact route map lookups
This commit is contained in:
@@ -754,6 +754,36 @@ Follow-ups:
|
||||
- Next smaller slice candidate: add focused helper test for strict null behavior on empty-string/whitespace/non-exact path keys.
|
||||
- Next larger slice candidate: evaluate extractability of `/myportal/representation` back-link states via explicit callback injection, only if questionnaire/submit side-effects remain parity-safe and readable.
|
||||
|
||||
### CL-22541-X: breadcrumbs smaller slice — strict null lookup guard coverage (empty/whitespace/non-exact paths)
|
||||
|
||||
date: 2026-04-09
|
||||
author: Cline
|
||||
scope: `tests/phase22/breadcrumb-route-maps-helper.test.cjs`
|
||||
type: change
|
||||
rationale: Execute the queued smaller follow-up slice by hardening helper regression coverage for strict exact-match route lookup semantics.
|
||||
impact: Test-only hardening; no runtime route/auth/session/API/EN-CY/a11y behavior change.
|
||||
status: completed
|
||||
|
||||
Summary:
|
||||
|
||||
- Added focused helper-level test case in `tests/phase22/breadcrumb-route-maps-helper.test.cjs`:
|
||||
- `resolveMappedRouteRenderer returns null for empty, whitespace, and non-exact path variants`
|
||||
- New assertions verify resolver returns `null` for:
|
||||
- empty path (`""`)
|
||||
- whitespace-only path (`" "`)
|
||||
- trailing/leading whitespace variants (`"/known "`, `" /known"`)
|
||||
- case-variant non-exact key (`"/KNOWN"`)
|
||||
- Confirms route-map resolver remains strict/exact and does not auto-trim or case-normalize lookup keys.
|
||||
|
||||
Validation:
|
||||
|
||||
- `npx eslint tests/phase22/breadcrumb-route-maps-helper.test.cjs tests/phase22/index.test.cjs` -> pass.
|
||||
- `node tests/phase22/index.test.cjs` -> pass (combined suite; breadcrumb-route-maps-helper 6/6).
|
||||
|
||||
Follow-ups:
|
||||
|
||||
- Next larger slice candidate remains `/myportal/representation` callback/state branch extraction only if side-effects can be injected/parity-preserved cleanly.
|
||||
|
||||
### CL-00X: 22500 `components/elements/index.js` Phase 1 helper extraction
|
||||
|
||||
date: 2026-04-07
|
||||
|
||||
Reference in New Issue
Block a user