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
test(events): harden public-SSE field test + clarify state-key comment
Addresses code-review minor findings on 46aed25:
1. serviceType mapping (r.type ?? r.serviceType) only tested the type:1 path.
Add a fallback case ({serviceType:2}, no type) and a type:0 case that locks
in ?? (not ||) semantics so a valid 0 service type is not dropped.
2. The naive balanced-brace/bracket extractors silently truncate if a brace or
bracket ever lands inside a string/regex in a target. Add mustExtract(): it
asserts each extracted block ends with its closing token AND contains a known
last field (baselineAtTest / activeRunNumber / next_in_ms), turning a
mis-extraction into a loud, clear failure instead of a misleading
field-missing assertion.
3. server.js PUBLIC_STATE_KEYS comment understated the audit — reword to note a
subset (testRun/runMode/runPlanId/pricingMode) is also read by public.html.
npm test: 57 assertions in the new suite, full suite green.
0 commit comments