Severity: P0 (test integrity — systemic) · Batch: B1 (test-integrity + CI)
Location
src/core/hookContext.js:170-183: withHookContext catches everything → logger.error → return null
Root cause
Seven spec files (useEvents/useClasses/useAttributes/useStyles/useText/signalEffect/nonSignalWarning) place expect() assertions inside withHookContext(...) callbacks — a thrown AssertionError is eaten by the framework and the test passes.
Proof
src/tests/useEvents.spec.js:216-242 asserts addEventListener receives raw handler1 and that signal handlers fire — both demonstrably false in the current implementation (BUG-1), yet the suite is green.
Proposed fix
In tests, assert outside the callback or capture results; better, make withHookContext rethrow unknown errors in a test/debug mode. Re-run the whole suite after fixing — expect real failures to surface.
Verification recipe
Spec: withHookContext(el, () => { expect(true).toBe(false) }) followed by an outside assertion that the callback's failure surfaced — demonstrate it returns null and the test framework saw no failure. Expected on unmodified code: swallowed → confirmed.
Severity: P0 (test integrity — systemic) · Batch: B1 (test-integrity + CI)
Location
src/core/hookContext.js:170-183:withHookContextcatches everything →logger.error→return nullRoot cause
Seven spec files (useEvents/useClasses/useAttributes/useStyles/useText/signalEffect/nonSignalWarning) place
expect()assertions insidewithHookContext(...)callbacks — a thrown AssertionError is eaten by the framework and the test passes.Proof
src/tests/useEvents.spec.js:216-242assertsaddEventListenerreceives rawhandler1and that signal handlers fire — both demonstrably false in the current implementation (BUG-1), yet the suite is green.Proposed fix
In tests, assert outside the callback or capture results; better, make
withHookContextrethrow unknown errors in a test/debug mode. Re-run the whole suite after fixing — expect real failures to surface.Verification recipe
Spec:
withHookContext(el, () => { expect(true).toBe(false) })followed by an outside assertion that the callback's failure surfaced — demonstrate it returnsnulland the test framework saw no failure. Expected on unmodified code: swallowed → confirmed.