MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / failingFetch

Function failingFetch

apps/cloud/src/auth/jwks-cache.node.test.ts:97–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95
96/** A fetch that always fails, standing in for a slow/down key server. */
97const 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
102describe("createCachedRemoteJWKSet", () => {
103 it("FAILING-WITHOUT-CACHE: N verifications hit JWKS endpoint only once within TTL", async () => {

Callers 1

flakyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected