Suite of AT Protocol TypeScript libraries built on web standards
20
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix test leaks

+13 -2
+4 -2
identity/tests/did-cache_test.ts
··· 83 83 84 84 // let's mess with the cached doc so we get something different 85 85 didCache.cacheDid(did, { ...doc, id: "did:example:alice" }); 86 - await wait(1); 86 + // Wait longer than staleTTL (1ms) to ensure entry becomes stale 87 + await wait(5); 87 88 88 89 // first check the cache & see that we have the stale value 89 90 const cached = shortCacheResolver.cache?.checkCache(did); ··· 112 113 113 114 // again, we mess with the cached doc so we get something different 114 115 didCache.cacheDid(did, { ...doc, id: "did:example:alice" }); 115 - await wait(1); 116 + // Wait longer than maxTTL (1ms) to ensure entry expires 117 + await wait(5); 116 118 117 119 // see that the resolver does not return expired value & instead force refreshes 118 120 const staleGet = await shortExpireResolver.resolve(did);
+5
xrpc-server/mod.ts
··· 19 19 * Works with Deno, Node.js, Bun, Cloudflare Workers, and other JavaScript runtimes 20 20 * supported by Hono. 21 21 * 22 + * Note: Subscription (WebSocket) endpoints are currently supported only in Deno 23 + * and Cloudflare Workers. On Node.js and Bun, query/procedure routes function 24 + * normally, but subscription endpoints are not yet available (WebSocket upgrades 25 + * will be rejected or unmounted). 26 + * 22 27 * @example Basic server setup with a simple endpoint 23 28 * ```ts 24 29 * import { createServer } from "jsr:@atp/xrpc-server";
+4
xrpc-server/tests/subscriptions_test.ts
··· 460 460 } 461 461 } 462 462 463 + // Allow internal subscription cleanup (heartbeat interval & socket close) to settle 464 + // so Deno's leak detector doesn't flag the pending timer from the generator's wait(0). 465 + await new Promise((r) => setTimeout(r, 0)); 466 + 463 467 // Ensure we actually received the expected early messages 464 468 assertEquals(messagesReceived >= 2, true); 465 469 } finally {