MCPcopy
hub / github.com/Effect-TS/effect / layer

Function layer

packages/platform-browser/test/BrowserHttpClient.test.ts:7–13  ·  view source on GitHub ↗
(...args: Parameters<typeof MXHR.newServer>)

Source from the content-addressed store, hash-verified

5import * as MXHR from "mock-xmlhttprequest"
6
7const layer = (...args: Parameters<typeof MXHR.newServer>) =>
8 Layer.unwrapEffect(Effect.sync(() => {
9 const server = MXHR.newServer(...args)
10 return BrowserHttpClient.layerXMLHttpRequest.pipe(
11 Layer.provide(Layer.succeed(BrowserHttpClient.XMLHttpRequest, server.xhrFactory))
12 )
13 }))
14
15describe("BrowserHttpClient", () => {
16 it.effect("json", () =>

Callers 1

Calls 3

syncMethod · 0.80
pipeMethod · 0.65
provideMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…