Files
meshcore-analyzer/test-decoder.js
Kpa-clawbot 1137dd1c08 test: close test gaps for #123 decrypted status and #131 WS handler runtime
Gap 1 (#123): Add 3 decoder tests for GRP_TXT decrypted status path.
Mock ChannelCrypto via require.cache to simulate successful decryption.
Tests cover: sender+message formatting, no-sender fallback, multi-key
iteration with first-match-wins semantics.

Gap 2 (#131): Rewrite 5 src.includes() string-match tests as runtime
vm.createContext tests. New makeNodesWsSandbox() helper with controllable
setTimeout, mock DOM, tracked API/cache calls, and real debouncedOnWS.
Tests verify: ADVERT triggers refresh, non-ADVERT ignored, debounce
collapses multiple ADVERTs, cache reset forces re-fetch, scroll/selection
preserved during WS-triggered refresh.

Decoder: 58 -> 61 tests. Frontend helpers: 87 (5 replaced, not added).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 08:47:52 -07:00

18 KiB