MCPcopy Create free account

hub / github.com/wheresrhys/fetch-mock / functions

Functions137 in github.com/wheresrhys/fetch-mock

↓ 230 callersMethodfetchHandler
( this: FetchMock, requestInput: string | URL | Request, requestInit?: RequestInit, )
packages/fetch-mock/src/FetchMock.ts:100
↓ 196 callersMethodroute
( matcher: RouteMatcher | UserRouteConfig | RouteConfigWrapper, response?: RouteResponse, options?: User
packages/fetch-mock/src/FetchMock.ts:132
↓ 46 callersMethodcatch
(response?: RouteResponse)
packages/fetch-mock/src/FetchMock.ts:141
↓ 44 callersMethodcreateInstance
()
packages/fetch-mock/src/FetchMock.ts:97
↓ 35 callersMethoddone
(routeNames?: RouteName | RouteName[])
packages/fetch-mock/src/CallHistory.ts:135
↓ 32 callersMethodmockGlobal
(this: FetchMock)
packages/fetch-mock/src/FetchMock.ts:166
↓ 31 callersMethodcalls
(filter?: CallHistoryFilter, options?: RouteConfig)
packages/fetch-mock/src/CallHistory.ts:79
↓ 29 callersMethodcalled
(filter?: CallHistoryFilter, options?: RouteConfig)
packages/fetch-mock/src/CallHistory.ts:125
↓ 28 callersFunctionexpectCodemodResult
( src, expected, fetchMockVariableName = 'fetchMock', )
packages/codemods/src/__tests__/method-codemods.test.js:7
↓ 25 callersFunctionexpectCodemodResult
(src, expected)
packages/codemods/src/__tests__/option-codemods.test.js:7
↓ 19 callersMethodof
(value: any)
packages/fetch-mock/src/TypeDescriptor.ts:62
↓ 14 callersFunctionconstructFormData
(props = { foo: 'bar' })
packages/fetch-mock/src/__tests__/Matchers/body.test.js:257
↓ 14 callersFunctiondefineShorthand
( shorthandOptions: UserRouteConfig | RouteConfigWrapper, )
packages/fetch-mock/src/FetchMock.ts:39
↓ 13 callersMethodremoveRoutes
({ names, includeSticky, includeFallback, }: RemoveRouteOptions = {})
packages/fetch-mock/src/Router.ts:409
↓ 10 callersMethodclearHistory
()
packages/fetch-mock/src/FetchMock.ts:162
↓ 10 callersMethodflush
(waitForResponseMethods?: boolean)
packages/fetch-mock/src/CallHistory.ts:66
↓ 10 callersMethodisArray
(value: any)
packages/fetch-mock/src/TypeDescriptor.ts:107
↓ 10 callersMethodmockReset
(options: MockResetOptions = { includeSticky: false })
packages/jest/src/index.ts:20
↓ 10 callersMethodmockReset
(options: MockResetOptions = { includeSticky: false })
packages/vitest/src/index.ts:19
↓ 10 callersMethodmockRestore
(options?: MockResetOptions)
packages/jest/src/index.ts:27
↓ 9 callersFunctionexpectSingleUrl
(...filter)
packages/fetch-mock/src/__tests__/CallHistory.test.js:257
↓ 9 callersMethodmodifyRoute
(routeName: string, options: ModifyRouteConfig)
packages/fetch-mock/src/Router.ts:429
↓ 7 callersFunctionexpectCodemodResult
(src, expected)
packages/codemods/src/__tests__/identifying-fetchmock-instances.test.js:5
↓ 7 callersFunctiontestChainableRoutingMethod
(method, ...args)
packages/fetch-mock/src/__tests__/FetchMock/routing.test.js:22
↓ 7 callersMethodunmockGlobal
(this: FetchMock)
packages/fetch-mock/src/FetchMock.ts:170
↓ 6 callersFunctioncodemod
(source, variableName)
packages/codemods/src/index.js:32
↓ 6 callersFunctiongetDelayedAbortController
(delay)
packages/fetch-mock/src/__tests__/FetchMock/response-negotiation.test.js:246
↓ 6 callersMethodlastCall
( filter?: CallHistoryFilter, options?: RouteConfig, )
packages/fetch-mock/src/CallHistory.ts:128
↓ 6 callersMethodmockClear
()
packages/jest/src/index.ts:16
↓ 6 callersMethodmockClear
()
packages/vitest/src/index.ts:15
↓ 6 callersMethodspy
( this: FetchMock, matcher?: RouteMatcher | UserRouteConfig | RouteConfigWrapper, name?: RouteName, )
packages/fetch-mock/src/FetchMock.ts:182
↓ 5 callersMethodabort
()
packages/fetch-mock/src/Router.ts:161
↓ 5 callersFunctiongetFetchMockFromInput
(input: PatchedFetch | FetchMock)
packages/jest/src/jest-extensions.ts:16
↓ 5 callersFunctiongetFetchMockFromInput
(input: PatchedFetch | FetchMock)
packages/vitest/src/vitest-extensions.ts:18
↓ 5 callersFunctiongetPath
(url: string)
packages/fetch-mock/src/RequestUtils.ts:121
↓ 5 callersMethodisObject
(value: any)
packages/fetch-mock/src/TypeDescriptor.ts:127
↓ 5 callersFunctionnormalizeHeaders
( headers: HeadersInit | { [key: string]: string | number }, )
packages/fetch-mock/src/RequestUtils.ts:144
↓ 4 callersMethodclear
()
packages/fetch-mock/src/CallHistory.ts:57
↓ 4 callersFunctionfetchTheseUrls
(...urls)
packages/fetch-mock/src/__tests__/CallHistory.test.js:11
↓ 4 callersMethodmockRestore
(options?: MockResetOptions)
packages/vitest/src/index.ts:26
↓ 4 callersFunctionnormalizeUrl
( url: string | String | URL, allowRelativeUrls: boolean, )
packages/fetch-mock/src/RequestUtils.ts:25
↓ 4 callersFunctiontestChainableMethod
(method, ...args)
packages/fetch-mock/src/__tests__/FetchMock/mock-and-spy.test.js:14
↓ 3 callersFunctionappendError
(message, path)
packages/codemods/src/codemods/options.js:5
↓ 3 callersMethoddefineMatcher
(matcher: MatcherDefinition)
packages/fetch-mock/src/Route.ts:311
↓ 3 callersMethodexecute
(callLog: CallLog)
packages/fetch-mock/src/Router.ts:153
↓ 3 callersMethodisFunction
(value: any)
packages/fetch-mock/src/TypeDescriptor.ts:115
↓ 3 callersMethodisNull
(value: any)
packages/fetch-mock/src/TypeDescriptor.ts:119
↓ 3 callersFunctionstr2ab
(str)
packages/fetch-mock/src/__tests__/FetchMock/response-construction.test.js:75
↓ 3 callersFunctiontestChainableMethod
(method, ...args)
packages/fetch-mock/src/__tests__/FetchMock/routing.test.js:10
↓ 2 callersFunctioncreateCallLogFromRequest
( request: Request, options: RequestInit, )
packages/fetch-mock/src/RequestUtils.ts:89
↓ 2 callersFunctioncreatePackageJson
(format)
scripts/declare-dist-type.js:7
↓ 2 callersFunctiondefineGreedyShorthand
(shorthandOptions: UserRouteConfig)
packages/fetch-mock/src/FetchMock.ts:68
↓ 2 callersFunctionformDataToObject
(formData: FormData)
packages/fetch-mock/src/Matchers.ts:198
↓ 2 callersFunctiongetAllChainedMethodCalls
(fetchMockVariableName, root)
packages/codemods/src/codemods/methods.js:3
↓ 2 callersFunctiongetFullUrlMatcher
( route: RouteConfig, matcherUrl: string, query: { [key: string]: string }, )
packages/fetch-mock/src/Matchers.ts:266
↓ 2 callersFunctiongetQuery
(url: string)
packages/fetch-mock/src/RequestUtils.ts:137
↓ 2 callersFunctiongetRegexpMatcher
(regexp: RegExp)
packages/fetch-mock/src/Matchers.ts:262
↓ 2 callersMethodhardReset
(options?: HardResetOptions)
packages/fetch-mock/src/FetchMock.ts:175
↓ 2 callersMethodinit
(config: RouteConfig | ModifyRouteConfig)
packages/fetch-mock/src/Route.ts:145
↓ 2 callersFunctionisUrlMatcher
( matcher: RouteMatcher | RouteConfig, )
packages/fetch-mock/src/Matchers.ts:36
↓ 2 callersFunctionprependFetchMock
(src)
packages/codemods/src/__tests__/option-codemods.test.js:4
↓ 2 callersFunctionprependFetchMock
(src, fetchMockVariableName)
packages/codemods/src/__tests__/method-codemods.test.js:4
↓ 2 callersMethodremoveRoute
(routeName: string)
packages/fetch-mock/src/FetchMock.ts:152
↓ 2 callersMethodremoveRoutes
(options?: RemoveRouteOptions)
packages/fetch-mock/src/FetchMock.ts:148
↓ 2 callersMethodspyGlobal
(this: FetchMock)
packages/fetch-mock/src/FetchMock.ts:203
↓ 1 callersMethod#delayResponse
()
packages/fetch-mock/src/Route.ts:205
↓ 1 callersMethod#generateMatcher
()
packages/fetch-mock/src/Route.ts:176
↓ 1 callersMethod#limit
()
packages/fetch-mock/src/Route.ts:188
↓ 1 callersMethod#sanitize
()
packages/fetch-mock/src/Route.ts:171
↓ 1 callersMethod#validate
()
packages/fetch-mock/src/Route.ts:156
↓ 1 callersFunctionab2str
(buf)
packages/fetch-mock/src/__tests__/FetchMock/response-construction.test.js:71
↓ 1 callersMethodaddRoute
( matcher: RouteMatcher | UserRouteConfig, response?: RouteResponse, nameOrOptions?: UserRouteConfig | s
packages/fetch-mock/src/Router.ts:323
↓ 1 callersMethodconstructResponse
(responseInput: RouteResponseConfig)
packages/fetch-mock/src/Route.ts:234
↓ 1 callersMethodconstructResponseBody
( responseInput: RouteResponseConfig, responseOptions: ResponseInitUsingHeaders, )
packages/fetch-mock/src/Route.ts:264
↓ 1 callersMethodconstructResponseOptions
( responseInput: RouteResponseConfig, )
packages/fetch-mock/src/Route.ts:253
↓ 1 callersFunctioncreateCallLogFromUrlAndOptions
( url: string | String | object, options: RequestInit, )
packages/fetch-mock/src/RequestUtils.ts:57
↓ 1 callersMethodcreateObservableResponse
( response: Response, responseConfig: ResponseInit, responseInput: RouteResponseConfig, responseUrl: s
packages/fetch-mock/src/Router.ts:265
↓ 1 callersFunctionfindFetchMockVariableName
(root)
packages/codemods/src/index.js:5
↓ 1 callersMethodfrom
(value: any)
packages/fetch-mock/src/TypeDescriptor.ts:91
↓ 1 callersMethodgenerateResponse
(callLog: CallLog)
packages/fetch-mock/src/Router.ts:241
↓ 1 callersFunctiongetHost
(url: string)
packages/fetch-mock/src/RequestUtils.ts:128
↓ 1 callersFunctionhasCredentialsInUrl
(url: string)
packages/fetch-mock/src/RequestUtils.ts:17
↓ 1 callersFunctionimportJSDOM
()
packages/fetch-mock/src/__tests__/Matchers/url.test.js:289
↓ 1 callersFunctionisBodyInit
(body: BodyInit | object)
packages/fetch-mock/src/Route.ts:95
↓ 1 callersMethodisBoolean
(value: any)
packages/fetch-mock/src/TypeDescriptor.ts:111
↓ 1 callersFunctionisFunctionMatcher
( matcher: RouteMatcher | RouteConfig, )
packages/fetch-mock/src/Matchers.ts:43
↓ 1 callersFunctionisMatchedOrUnmatched
( filter: CallHistoryFilter, )
packages/fetch-mock/src/CallHistory.ts:38
↓ 1 callersFunctionisName
(filter: CallHistoryFilter)
packages/fetch-mock/src/CallHistory.ts:33
↓ 1 callersMethodisNumber
(value: any)
packages/fetch-mock/src/TypeDescriptor.ts:123
↓ 1 callersFunctionisPromise
(response: RouteResponse)
packages/fetch-mock/src/Router.ts:41
↓ 1 callersMethodisReferenceType
( value: any, )
packages/fetch-mock/src/TypeDescriptor.ts:101
↓ 1 callersMethodisString
(value: any)
packages/fetch-mock/src/TypeDescriptor.ts:131
↓ 1 callersFunctionisSubsetOf
( subset: any[] | Record<string, any | undefined> | null, superset: any[] | Record<string, any | undefined>
packages/fetch-mock/src/IsSubsetOf.ts:7
↓ 1 callersMethodisSymbol
(value: any)
packages/fetch-mock/src/TypeDescriptor.ts:135
↓ 1 callersMethodisUndefined
(value: any)
packages/fetch-mock/src/TypeDescriptor.ts:139
↓ 1 callersMethodisValueType
( value: any, )
packages/fetch-mock/src/TypeDescriptor.ts:95
↓ 1 callersFunctionmanageFetchMockGlobally
(jest: Jest)
packages/jest/src/index.ts:33
↓ 1 callersFunctionmanageFetchMockGlobally
()
packages/vitest/src/index.ts:32
↓ 1 callersFunctionnameToOptions
(options: RouteConfig | string)
packages/fetch-mock/src/Router.ts:37
↓ 1 callersMethodneedsToReadBody
(request: Request)
packages/fetch-mock/src/Router.ts:147
next →1–100 of 137, ranked by callers