···83838484 // let's mess with the cached doc so we get something different
8585 didCache.cacheDid(did, { ...doc, id: "did:example:alice" });
8686- await wait(1);
8686+ // Wait longer than staleTTL (1ms) to ensure entry becomes stale
8787+ await wait(5);
87888889 // first check the cache & see that we have the stale value
8990 const cached = shortCacheResolver.cache?.checkCache(did);
···112113113114 // again, we mess with the cached doc so we get something different
114115 didCache.cacheDid(did, { ...doc, id: "did:example:alice" });
115115- await wait(1);
116116+ // Wait longer than maxTTL (1ms) to ensure entry expires
117117+ await wait(5);
116118117119 // see that the resolver does not return expired value & instead force refreshes
118120 const staleGet = await shortExpireResolver.resolve(did);
+5
xrpc-server/mod.ts
···1919 * Works with Deno, Node.js, Bun, Cloudflare Workers, and other JavaScript runtimes
2020 * supported by Hono.
2121 *
2222+ * Note: Subscription (WebSocket) endpoints are currently supported only in Deno
2323+ * and Cloudflare Workers. On Node.js and Bun, query/procedure routes function
2424+ * normally, but subscription endpoints are not yet available (WebSocket upgrades
2525+ * will be rejected or unmounted).
2626+ *
2227 * @example Basic server setup with a simple endpoint
2328 * ```ts
2429 * import { createServer } from "jsr:@atp/xrpc-server";
+4
xrpc-server/tests/subscriptions_test.ts
···460460 }
461461 }
462462463463+ // Allow internal subscription cleanup (heartbeat interval & socket close) to settle
464464+ // so Deno's leak detector doesn't flag the pending timer from the generator's wait(0).
465465+ await new Promise((r) => setTimeout(r, 0));
466466+463467 // Ensure we actually received the expected early messages
464468 assertEquals(messagesReceived >= 2, true);
465469 } finally {