(respond: (request: Request) => Response)
| 92 | // setting it discharges no requirement — the layer is `Layer<never>` and works |
| 93 | // by overriding the default in whatever context it is provided to. |
| 94 | const stubFetch = (respond: (request: Request) => Response): Layer.Layer<never> => |
| 95 | Layer.succeed(FetchHttpClient.Fetch)(((input: RequestInfo | URL, init?: RequestInit) => |
| 96 | Promise.resolve( |
| 97 | respond(input instanceof Request ? input : new Request(String(input), init)), |
| 98 | )) as typeof globalThis.fetch); |
| 99 | |
| 100 | /** |
| 101 | * Runs a traced effect against a recording fetch and returns the URLs the |
no test coverage detected