| 95 | |
| 96 | /** A fetch that always fails, standing in for a slow/down key server. */ |
| 97 | const failingFetch: typeof globalThis.fetch = async () => { |
| 98 | // oxlint-disable-next-line executor/no-try-catch-or-throw, executor/no-error-constructor -- test double: `fetch` signals an unreachable key server by rejecting |
| 99 | throw new Error("JWKS endpoint unreachable"); |
| 100 | }; |
| 101 | |
| 102 | describe("createCachedRemoteJWKSet", () => { |
| 103 | it("FAILING-WITHOUT-CACHE: N verifications hit JWKS endpoint only once within TTL", async () => { |