Lines Matching defs:function
19 function matchValue (match, value) {
26 if (typeof match === 'function') {
32 function lowerCaseEntries (headers) {
44 function getHeaderByName (headers, key) {
53 } else if (typeof headers.get === 'function') {
61 function buildHeadersFromArray (headers) { // fetch HeadersList
70 function matchHeaders (mockDispatch, headers) {
71 if (typeof mockDispatch.headers === 'function') {
94 function safeUrl (path) {
110 function matchKey (mockDispatch, { path, method, body, headers }) {
118 function getResponseData (data) {
128 function getMockDispatch (mockDispatches, key) {
159 function addMockDispatch (mockDispatches, key, data) {
161 const replyData = typeof data === 'function' ? { callback: data } : { ...data }
167 function deleteMockDispatch (mockDispatches, key) {
179 function buildKey (opts) {
190 function generateKeyValues (data) {
202 function getStatusText (statusCode) {
206 async function getResponse (body) {
215 * Mock dispatch function used to simulate undici dispatches
217 function mockDispatch (opts, handler) {
253 function handleReply (mockDispatches, _data = data) {
258 const body = typeof _data === 'function'
284 function resume () {}
289 function buildMockDispatch () {
294 return function dispatch (opts, handler) {
319 function checkNetConnect (netConnect, origin) {
329 function buildMockOptions (opts) {