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

Function deleteMockDispatch

deps/undici/src/lib/mock/mock-utils.js:215–225  ·  view source on GitHub ↗
(mockDispatches, key)

Source from the content-addressed store, hash-verified

213}
214
215function deleteMockDispatch (mockDispatches, key) {
216 const index = mockDispatches.findIndex(dispatch => {
217 if (!dispatch.consumed) {
218 return false
219 }
220 return matchKey(dispatch, key)
221 })
222 if (index !== -1) {
223 mockDispatches.splice(index, 1)
224 }
225}
226
227/**
228 * @param {string} path Path to remove trailing slash from

Callers 2

mockDispatchFunction · 0.85
handleReplyFunction · 0.85

Calls 1

matchKeyFunction · 0.85

Tested by

no test coverage detected