MCPcopy
hub / github.com/mswjs/msw / constructor

Method constructor

src/node/setup-server-common.ts:57–65  ·  view source on GitHub ↗
(
    interceptors: Array<Interceptor<any>>,
    handlers: Array<AnyHandler> | HandlersController,
  )

Source from the content-addressed store, hash-verified

55 protected network: NetworkApi<[InterceptorSource]>
56
57 constructor(
58 interceptors: Array<Interceptor<any>>,
59 handlers: Array<AnyHandler> | HandlersController,
60 ) {
61 this.network = defineNetwork({
62 sources: [new InterceptorSource({ interceptors })],
63 handlers,
64 })
65 }
66
67 get events() {
68 return this.network.events

Callers

nothing calls this directly

Calls 1

defineNetworkFunction · 0.90

Tested by

no test coverage detected