MCPcopy Create free account
hub / github.com/nodejs/node / pendingInterceptors

Method pendingInterceptors

deps/undici/src/lib/mock/mock-agent.js:209–215  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

207 }
208
209 pendingInterceptors () {
210 const mockAgentClients = this[kClients]
211
212 return Array.from(mockAgentClients.entries())
213 .flatMap(([origin, dispatcher]) => dispatcher[kDispatches].map(dispatch => ({ ...dispatch, origin })))
214 .filter(({ pending }) => pending)
215 }
216
217 assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) {
218 const pending = this.pendingInterceptors()

Callers 1

Calls 5

flatMapMethod · 0.80
filterMethod · 0.65
mapMethod · 0.65
fromMethod · 0.45
entriesMethod · 0.45

Tested by

no test coverage detected