mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 16:02:26 +00:00
Fully closes #11b's un-quarantine work: the QUARANTINE map is now EMPTY. dm-block-filter.test.mjs (node:test) PASSED all subtests then hung, so the node:test runner never exited. Diagnosed via process.getActiveResourcesInfo(): the "integration with loaded user block list" test's manager.loadBlocks() opens a LIVE block-list subscription through nostrClient's real SimplePool aimed at the test's fake relay URLs, leaking 4 TCP sockets + reconnect timers. It is NOT the decrypt-retry timer (verified absent). Nulling nostrClient.pool did not help — loadBlocks calls ensurePool() (userBlocks.js:967) to re-create+connect a real pool when pool is falsy. Fix (node:test-SAFE, no force-exit): make the test hermetic — (1) a TRUTHY stub pool so ensurePool() is skipped, (2) a no-op getSubscriptionManager so startBlockListSubscription opens nothing. The block-merge logic under test still runs fully through the already-stubbed fetchListIncrementally. Restored in finally. Verified BOTH directions: a clean run exits 0 (# pass 12), AND a deliberately broken assertion still exits 1 (# fail 1) — failures are NOT masked. A force process.exit in an after() hook was rejected precisely because it masked failures (process.exitCode isn't set when the hook fires). See TEST_INTEGRITY.md. NOTE: the full suite still has one SEPARATE, pre-existing red unrelated to #11b — tests/ui/uploadModal-reset.test.mjs (TODO #11): its "zombie callbacks" subtest feeds a plain object where webtorrent expects a Blob ("must be an instance of Blob") and leaks async activity after the test ends. Untouched here; tracked under #11 (harden flaky tests), not the #11b quarantine work. Co-Authored-By: Claude Opus 4.8 <[email protected]>