Skip to content

Verification: Utility Extraction

Traceability matrix for Part 2 of Component Preparation. Requirements are defined in requirements.md.

RequirementTest / Verification MethodStatus
REQ-UE-A01api-route-utils.test.ts: UUID v4 format validation; uniqueness across callspending
REQ-UE-A02api-route-utils.test.ts: JSON content-type → parsed JSON; other → { raw } ; empty bodypending
REQ-UE-A03api-route-utils.test.ts: 2xx → 200; 4xx/5xx preserved; body contains ok, status, datapending
REQ-UE-A04grep -rn 'generateGuid' src/app/api/ returns no matches; existing route tests passpending
REQ-UE-A05npx jest api-route-utils.test.ts exits 0pending
RequirementTest / Verification MethodStatus
REQ-UE-B01Test block for lookupField: plain array, named field, results fallback, empty datapending
REQ-UE-B02Existing ardaClient.*.test.ts suites pass unchanged; grep -c 'lookupField' src/lib/ardaClient.ts confirms delegationpending
REQ-UE-B03npx jest ardaClient exits 0 with new test cases passingpending
RequirementTest / Verification MethodStatus
REQ-UE-C01grep -rn "atob(.*split.*\[1\])" src/ returns matches only in jwt.tspending
REQ-UE-C02grep -rn "split('\.').length !== 3" src/ returns matches only in jwt.tspending
REQ-UE-C03npx jest jwt.test exits 0; npx jest authThunks exits 0; npx jest tokenRefresh exits 0pending
RequirementTest / Verification MethodStatus
REQ-UE-D01storage.test.ts: valid JSON → parsed; malformed → fallback; empty → fallbackpending
REQ-UE-D02storage.test.ts: key exists → parsed; missing key → fallback; malformed value → fallbackpending
REQ-UE-D03storage.test.ts: stores serialized value; quota error → no throwpending
REQ-UE-D04npx jest storage.test.ts exits 0pending
RequirementTest / Verification MethodStatus
REQ-UE-E01errors.test.ts: Error → .message; string → identity; number/object/null/undefined → String()pending
REQ-UE-E02npx jest errors.test.ts exits 0pending
RequirementTest / Verification MethodStatus
REQ-UE-F01formatters.test.ts: ISO string → locale date; undefined'-'pending
REQ-UE-F02formatters.test.ts: ISO string → locale date+time; undefined'-'pending
REQ-UE-F03formatters.test.ts: Money → $X.XX CUR; undefined'-'; null value → '-'pending
REQ-UE-F04formatters.test.ts: Quantity → amount unit; undefined → defaultpending
REQ-UE-F05npx jest formatters.test.ts exits 0pending
RequirementTest / Verification MethodStatus
REQ-UE-G01env-spa.test.ts: constants reflect env var values under different configurationspending
REQ-UE-G02grep 'NEXT_PUBLIC_DEPLOY_ENV' src/lib/utils.ts returns no matches; grep 'IS_STAGE' src/lib/utils.ts returns matchespending
REQ-UE-G03npx jest env-spa.test.ts exits 0pending
RequirementTest / Verification MethodStatus
REQ-UE-X01npx tsc --noEmit exits 0 without changing consumer files beyond import pathspending
REQ-UE-X02git diff --name-only shows no changes to existing *.test.ts(x) files (except Group B additions)pending
REQ-UE-X03lint, typecheck, tests, build all exit 0 after each grouppending
REQ-UE-X04grep -A2 'Added|Changed' CHANGELOG.md shows utility extraction entriespending

Copyright: (c) Arda Systems 2025-2026, All rights reserved