Summary
packages/iroh-http-deno/test/adapter.test.ts fails when run as a whole file: after the publicKeyVerify test closes its node (handle 1), the next test (serve — no pending ops remain after signal abort (regression #115)) emits an uncaught promise rejection IrohHandleError: node closed or not found (handle 1). Each test passes in isolation when run with --filter.
Reproduction
deno test --allow-all packages/iroh-http-deno/test/adapter.test.ts
Reproduces on a clean main (verified by stashing the #155 fix — same failure, 5 passed / 4 failed).
Suspect path
A background polling task started during the previous test (likely a connection-event loop attached to handle 1) survives node.close() and observes the closed handle in the next tick, surfacing as an uncaught promise.
Acceptance criteria
deno test --allow-all packages/iroh-http-deno/test/adapter.test.ts runs the full file with no failures.
- Either the surviving polling loop is properly joined on
close(), or the surviving promise is awaited / cancelled before the next test starts.
Summary
packages/iroh-http-deno/test/adapter.test.tsfails when run as a whole file: after thepublicKeyVerifytest closes its node (handle 1), the next test (serve — no pending ops remain after signal abort (regression #115)) emits an uncaught promise rejectionIrohHandleError: node closed or not found (handle 1). Each test passes in isolation when run with--filter.Reproduction
Reproduces on a clean main (verified by stashing the #155 fix — same failure, 5 passed / 4 failed).
Suspect path
A background polling task started during the previous test (likely a connection-event loop attached to handle 1) survives
node.close()and observes the closed handle in the next tick, surfacing as an uncaught promise.Acceptance criteria
deno test --allow-all packages/iroh-http-deno/test/adapter.test.tsruns the full file with no failures.close(), or the surviving promise is awaited / cancelled before the next test starts.