MCPcopy Create free account

hub / github.com/mswjs/interceptors / functions

Functions345 in github.com/mswjs/interceptors

↓ 2 callersFunctiondeleteGlobalSymbol
(symbol: Symbol)
src/Interceptor.ts:29
↓ 2 callersMethoddispatchEvent
( event: WebSocketTransportEventMap[EventType] )
src/interceptors/WebSocket/WebSocketClassTransport.ts:59
↓ 2 callersFunctionencode
(text: string, encoding: BufferEncoding)
test/modules/http/compliance/http-res-set-encoding.test.ts:34
↓ 2 callersMethodexecute
(buffer: Buffer)
_http_common.d.ts:35
↓ 2 callersMethodflushWriteBuffer
()
src/interceptors/ClientRequest/MockHttpSocket.ts:500
↓ 2 callersFunctionforceGc
()
test/modules/fetch/fetch-memory-worker.js:67
↓ 2 callersFunctionforwardServerUrl
(page: Page)
test/modules/fetch/response/fetch-response-patching.browser.test.ts:22
↓ 2 callersFunctionfreeParser
(parser: HTTPParser<any>, socket?: Socket)
src/interceptors/ClientRequest/utils/parserUtils.ts:7
↓ 2 callersFunctiongetAgent
( options: ResolvedRequestOptions )
src/utils/getUrlByRequestOptions.ts:21
↓ 2 callersFunctiongetClientRequestBodyStream
(request: Request)
src/utils/node/index.ts:15
↓ 2 callersFunctiongetDeepPropertyDescriptor
( owner: Owner, key: keyof Owner )
src/utils/patchesRegistry.ts:115
↓ 2 callersMethodgetInstance
()
src/Interceptor.ts:234
↓ 2 callersFunctiongetPortByRequestOptions
( options: ResolvedRequestOptions )
src/utils/getUrlByRequestOptions.ts:45
↓ 2 callersFunctionhandleResponse
( response: Response | Error | Record<string, any> )
src/utils/handleRequest.ts:26
↓ 2 callersMethodinitialize
(type: ParserType, asyncResource: object)
_http_common.d.ts:34
↓ 2 callersMethodisConfigurableMethod
* Check if the given request method is configurable. * @see https://fetch.spec.whatwg.org/#methods
src/utils/fetchUtils.ts:24
↓ 2 callersMethodisMethodWithBody
(method: string)
src/utils/fetchUtils.ts:28
↓ 2 callersFunctionisPlainObject
(obj?: Record<string, any>)
src/utils/cloneObject.ts:5
↓ 2 callersFunctionmakeRequest
()
test/modules/http/compliance/http-res-read-multiple-times.test.ts:62
↓ 2 callersMethodoff
( event: EventName, listener: Listener<Events[EventName]> )
src/Interceptor.ts:176
↓ 2 callersFunctionparallelRequests
( makeRequest: (index: number) => Promise<PromisifiedResponse> )
test/modules/http/http-performance.test.ts:17
↓ 2 callersMethodparseRawHeaders
* Parses the given raw HTTP headers into a Fetch API `Headers` instance.
src/utils/fetchUtils.ts:248
↓ 2 callersFunctionreadIncomingMessage
(res: http.IncomingMessage)
test/modules/http/compliance/http-res-set-encoding.test.ts:38
↓ 2 callersFunctionrecordRawHeader
( headers: Headers, args: HeaderTuple, behavior: SetHeaderBehavior )
src/interceptors/ClientRequest/utils/recordRawHeaders.ts:10
↓ 2 callersMethodregisterUploadEvent
( eventName: keyof XMLHttpRequestEventTargetEventMap, listener: Function )
src/interceptors/XMLHttpRequest/XMLHttpRequestController.ts:278
↓ 2 callersFunctionsameOrigin
* @see https://github.com/nodejs/undici/blob/a6dac3149c505b58d2e6d068b97f4dc993da55f0/lib/web/fetch/util.js#L761
src/interceptors/fetch/utils/followRedirect.ts:100
↓ 2 callersMethodsetStatus
(status: number, response: Response)
src/utils/fetchUtils.ts:191
↓ 2 callersFunctiontoAbsoluteUrl
(url: string | URL)
src/interceptors/XMLHttpRequest/XMLHttpRequestController.ts:721
↓ 1 callersMethodaddEventListener
* Listen for the incoming events from the original WebSocket server.
src/interceptors/WebSocket/WebSocketServerConnection.ts:208
↓ 1 callersFunctionbaseUrlFromConnectionOptions
(options: any)
src/interceptors/Socket/utils/baseUrlFromConnectionOptions.ts:1
↓ 1 callersMethodcheckEnvironment
* Determine if this interceptor can be applied * in the current environment.
src/Interceptor.ts:70
↓ 1 callersMethodclearInstance
()
src/Interceptor.ts:245
↓ 1 callersMethodclose
(code: number = 1000, reason?: string)
src/interceptors/WebSocket/WebSocketOverride.ts:163
↓ 1 callersMethodconnect
* Open connection to the original WebSocket server.
src/interceptors/WebSocket/WebSocketServerConnection.ts:121
↓ 1 callersFunctioncreateBrowserXMLHttpRequest
(page: Page)
test/helpers.ts:277
↓ 1 callersFunctioncreateDecompressionStream
( contentEncoding: string )
src/interceptors/fetch/utils/decompression.ts:32
↓ 1 callersFunctioncreateHeadersFromXMLHttpRequestHeaders
(headersString: string)
src/interceptors/XMLHttpRequest/utils/createResponse.ts:33
↓ 1 callersFunctioncreateResponse
( request: XMLHttpRequest, body: BodyInit | null )
src/interceptors/XMLHttpRequest/utils/createResponse.ts:7
↓ 1 callersFunctioncreateServerErrorResponse
(body: unknown)
src/utils/responseUtils.ts:7
↓ 1 callersFunctioncreateXMLHttpRequestProxy
({ emitter, logger, }: XMLHttpRequestProxyOptions)
src/interceptors/XMLHttpRequest/XMLHttpRequestProxy.ts:18
↓ 1 callersFunctiondecodeMessage
( // @ts-expect-error encodedEngineIoPacket )
test/modules/WebSocket/third-party/socket.io.browser.test.ts:62
↓ 1 callersFunctiondecompressResponse
( response: Response )
src/interceptors/fetch/utils/decompression.ts:65
↓ 1 callersFunctiondefineRawHeadersSymbol
* Define the raw headers symbol on the given `Headers` instance. * If the symbol already exists, it gets overridden.
src/interceptors/ClientRequest/utils/recordRawHeaders.ts:49
↓ 1 callersFunctionencodeMessage
(data)
test/modules/WebSocket/third-party/socket.io.browser.test.ts:86
↓ 1 callersMethoderrorWith
* Close this socket connection with the given error.
src/interceptors/ClientRequest/MockHttpSocket.ts:457
↓ 1 callersFunctionfireBatch
(count, concurrency)
test/modules/fetch/fetch-memory-worker.js:34
↓ 1 callersFunctionfollowFetchRedirect
( request: Request, response: Response )
src/interceptors/fetch/utils/followRedirect.ts:16
↓ 1 callersMethodfree
()
_http_common.d.ts:49
↓ 1 callersFunctiongetAuthByRequestOptions
( options: ResolvedRequestOptions )
src/utils/getUrlByRequestOptions.ts:74
↓ 1 callersFunctiongetDataSize
(data: WebSocketData)
src/interceptors/WebSocket/WebSocketOverride.ts:242
↓ 1 callersFunctiongetHeader
(name: string)
test/modules/http/response/http-response-patching.test.ts:28
↓ 1 callersFunctiongetHostname
(options: ResolvedRequestOptions)
src/utils/getUrlByRequestOptions.ts:92
↓ 1 callersMethodgetManufacturer
()
src/utils/cloneObject.test.ts:43
↓ 1 callersFunctiongetProtocolByRequestOptions
(options: ResolvedRequestOptions)
src/utils/getUrlByRequestOptions.ts:27
↓ 1 callersFunctiongetResponse
(request: Request)
test/modules/http/response/http-response-patching.test.ts:15
↓ 1 callersFunctiongetWebpackHttpServer
()
test/webpackHttpServer.ts:10
↓ 1 callersMethodhandleMockClose
(_event: Event)
src/interceptors/WebSocket/WebSocketServerConnection.ts:385
↓ 1 callersMethodhandleRealClose
(event: CloseEvent)
src/interceptors/WebSocket/WebSocketServerConnection.ts:392
↓ 1 callersFunctionhandleResponseError
(error: unknown)
src/utils/handleRequest.ts:59
↓ 1 callersFunctionhttpsGet
( url: string, options?: RequestOptions )
test/helpers.ts:37
↓ 1 callersFunctionisBufferEqual
(left: ArrayBuffer, right: ArrayBuffer)
test/modules/XMLHttpRequest/compliance/xhr-response-type.test.ts:99
↓ 1 callersMethodisConfigurableMode
* Check if the given request `mode` is configurable. * @see https://fetch.spec.whatwg.org/#concept-request-mode
src/utils/fetchUtils.ts:40
↓ 1 callersMethodisConfigurableStatusCode
(status: number)
src/utils/fetchUtils.ts:175
↓ 1 callersFunctionisDomParserSupportedType
( type: string )
src/interceptors/XMLHttpRequest/utils/isDomParserSupportedType.ts:1
↓ 1 callersFunctionisNodeLikeError
( error: unknown )
src/utils/isNodeLikeError.ts:1
↓ 1 callersFunctionisRawIPv6Address
* Returns true if host looks like an IPv6 address without surrounding brackets * It assumes any host containing `:` is definitely not IPv4 and probab
src/utils/getUrlByRequestOptions.ts:88
↓ 1 callersMethodisRedirectResponse
(status: number)
src/utils/fetchUtils.ts:179
↓ 1 callersFunctionisResponseLike
(value: unknown)
src/utils/responseUtils.ts:52
↓ 1 callersFunctionmakeRequest
()
test/features/remote/child.js:6
↓ 1 callersMethodmockConnect
()
src/interceptors/ClientRequest/MockHttpSocket.ts:461
↓ 1 callersFunctionnextTickAsync
(callback: () => void)
src/utils/nextTick.ts:5
↓ 1 callersFunctionoptionsToProxyHandler
( options: ProxyOptions<T> )
src/utils/createProxy.ts:34
↓ 1 callersFunctionoverrideUrlByRequestOptions
* Overrides the given `URL` instance with the explicit properties provided * on the `RequestOptions` object. The options object takes precedence, *
src/interceptors/ClientRequest/utils/normalizeClientRequestArgs.ts:83
↓ 1 callersMethodpassthrough
* Establish this Socket connection as-is and pipe * its data/events through this Socket.
src/interceptors/ClientRequest/MockHttpSocket.ts:185
↓ 1 callersFunctionpromisifyClientRequest
( getRequest: () => http.ClientRequest )
test/modules/http/regressions/http-concurrent-same-host.test.ts:29
↓ 1 callersFunctionrandomBetween
(min: number, max: number)
test/modules/http/http-performance.test.ts:13
↓ 1 callersFunctionreadBlob
( blob: Blob )
test/helpers.ts:141
↓ 1 callersMethodregisterEvent
( eventName: keyof XMLHttpRequestEventTargetEventMap, listener: Function )
src/interceptors/XMLHttpRequest/XMLHttpRequestController.ts:267
↓ 1 callersMethodremove
()
_http_common.d.ts:47
↓ 1 callersFunctionresolveWebSocketUrl
(url: string | URL)
src/utils/resolveWebSocketUrl.ts:7
↓ 1 callersMethodrestoreAllPatches
()
src/utils/patchesRegistry.ts:79
↓ 1 callersFunctionsetGlobalSymbol
(symbol: Symbol, value: any)
src/Interceptor.ts:24
↓ 1 callersMethodsetInstance
()
src/Interceptor.ts:240
↓ 1 callersFunctionsetRawRequestBodyStream
( request: Request, stream: Readable )
src/utils/node/index.ts:34
↓ 1 callersMethodsetup
()
src/RemoteHttpInterceptor.ts:152
↓ 1 callersFunctionstartWebpackServer
()
test/webpackHttpServer.ts:20
↓ 1 callersMethodtoFetchApiRequest
* Converts this `XMLHttpRequest` instance into a Fetch API `Request` instance.
src/interceptors/XMLHttpRequest/XMLHttpRequestController.ts:665
↓ 1 callersMethodtoText
()
test/modules/http/compliance/http-res-read-multiple-times.test.ts:49
↓ 1 callersMethodunconsume
()
_http_common.d.ts:46
Method#handled
()
src/RequestController.ts:33
FunctionFakeGlobalScope
()
src/utils/hasConfigurableGlobal.test.ts:89
FunctionFakeGlobalScope
()
src/utils/patchesRegistry.test.ts:38
Method[kClose]
( code: number = 1000, reason?: string, wasClean = true )
src/interceptors/WebSocket/WebSocketOverride.ts:173
Method[kSend]
(data: WebSocketData)
src/interceptors/WebSocket/WebSocketServerConnection.ts:257
MethodaddEventListener
( type: EventType, callback: StrictEventListenerOrEventListenerObject< WebSocketTransportEventMa
src/interceptors/WebSocket/WebSocketClassTransport.ts:49
MethodaddEventListener
* Listen for the outgoing events from the connected WebSocket client.
src/interceptors/WebSocket/WebSocketClientConnection.ts:98
Functionapply
(target, thisArg, args: HeaderTuple)
src/interceptors/ClientRequest/utils/recordRawHeaders.ts:167
Methodcancelable
()
src/interceptors/WebSocket/utils/events.ts:21
Methodcancelable
()
src/interceptors/WebSocket/utils/events.ts:73
MethodcheckEnvironment
()
src/Interceptor.test.ts:93
← previousnext →101–200 of 345, ranked by callers