Lines Matching refs:dispatch
135 throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`)
141 throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`)
147 throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}'`)
153 throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers}'`)
168 const index = mockDispatches.findIndex(dispatch => {
169 if (!dispatch.consumed) {
172 return matchKey(dispatch, key)
215 * Mock dispatch function used to simulate undici dispatches
218 // Get mock dispatch from built key
224 // Here's where we resolve a callback if a callback is present for the dispatch data.
237 // If specified, trigger dispatch error
294 return function dispatch (opts, handler) {