MCPcopy Create free account

hub / github.com/nock/nock / functions

Functions226 in github.com/nock/nock

↓ 1 callersMethodisDone
()
lib/scope.js:196
↓ 1 callersFunctionload
(fixture, options)
lib/back.js:235
↓ 1 callersFunctionmakeRequest
(url, options = {})
tests/test_abort_signal.js:9
↓ 1 callersFunctionmakeRequest
tests/got/test_intercept_parallel.js:13
↓ 1 callersFunctionmapValues
(object, cb)
lib/match_body.js:64
↓ 1 callersFunctionmapValuesDeep
* Based on lodash issue discussion * https://github.com/lodash/lodash/issues/1244
lib/match_body.js:77
↓ 1 callersMethodmarkConsumed
()
lib/interceptor.js:452
↓ 1 callersMethodmatchHeader
(name, value)
lib/scope.js:253
↓ 1 callersMethodmatchHeader
(name, value)
lib/interceptor.js:462
↓ 1 callersMethodmatchHostName
(options)
lib/interceptor.js:418
↓ 1 callersMethodmatchOrigin
* Return true when the interceptor's method, protocol, host, port, and path * match the provided options.
lib/interceptor.js:383
↓ 1 callersMethodmatchQuery
(options)
lib/interceptor.js:428
↓ 1 callersFunctionnockBackWithFixture
(mochaDone, scopesLoaded)
tests/test_back.js:47
↓ 1 callersFunctionnockBackWithFixtureLocalhost
(mochaDone)
tests/test_back.js:70
↓ 1 callersFunctionnormalizeOrigin
* In WHATWG URL vernacular, this returns the origin portion of a URL. * However, the port is not included if it's standard and not already present on
lib/common.js:58
↓ 1 callersFunctionnormalizeUrl
* Normalizes the passed url for consistent internal processing * @param {string|LegacyUrl|URL} u
lib/scope.js:27
↓ 1 callersFunctionoverrideClientRequest
()
lib/intercept.js:252
↓ 1 callersFunctionparseFullReplyResult
(response, fullReplyResult)
lib/playback_interceptor.js:23
↓ 1 callersFunctionparseJSONRequestBody
(req, requestBody)
lib/playback_interceptor.js:9
↓ 1 callersFunctionplaybackInterceptor
* Play back an interceptor using the given request and mock response.
lib/playback_interceptor.js:115
↓ 1 callersFunctionprepareResponseHeaders
(body)
lib/playback_interceptor.js:243
↓ 1 callersMethodquery
* Set query strings for the interceptor * @name query * @param queries Object of query string name,values (accepts regexp values) * @public
lib/interceptor.js:482
↓ 1 callersFunctionreadFile
()
examples/binary-reply.js:7
↓ 1 callersFunctionrecordResponse
(mswRequest, mswResponse)
lib/recorder.js:257
↓ 1 callersMethodref
()
lib/socket.js:41
↓ 1 callersFunctionremove
(interceptor)
lib/intercept.js:123
↓ 1 callersFunctionremoveFixture
(fixture, options)
lib/back.js:274
↓ 1 callersMethodreply
(statusCode, body, rawHeaders)
lib/interceptor.js:114
↓ 1 callersMethodreqheaderMatches
(options, key)
lib/interceptor.js:215
↓ 1 callersFunctionresolvesInAtLeast
(promise, durationMillis)
tests/got/test_delay.js:16
↓ 1 callersFunctionselectDefaultHeaders
* Determine which of the default headers should be added to the response. * * Don't include any defaults whose case-insensitive keys are already on
lib/playback_interceptor.js:54
↓ 1 callersMethodsetHostHeaderUsingInterceptor
* Set request headers of the given request. This is needed both during the * routing phase, in case header filters were specified, and during the
lib/intercepted_request_router.js:227
↓ 1 callersMethodsetKeepAlive
()
lib/socket.js:39
↓ 1 callersMethodsetNoDelay
()
lib/socket.js:38
↓ 1 callersFunctionsocketOnClose
(req)
lib/intercepted_request_router.js:11
↓ 1 callersFunctionsomethingBad
()
tests/got/test_nock_lifecycle.js:190
↓ 1 callersFunctionstart
()
lib/playback_interceptor.js:126
↓ 1 callersMethodstartPlayback
()
lib/intercepted_request_router.js:267
↓ 1 callersFunctiontryJsonParse
(string)
lib/scope.js:342
↓ 1 callersMethodunref
()
lib/socket.js:42
↓ 1 callersFunctionwrapTimer
(timer, ids)
lib/common.js:525
FunctionBack
* nock the current function with the fixture given * * @param {string} fixtureName - the name of the fixture, e.x. 'foo.json' * @param {object}
lib/back.js:46
FunctionConstructor
()
tests/got/test_stream.js:103
FunctionFoo
()
tests/test_common.js:542
FunctionNetConnectNotAllowedError
* @name NetConnectNotAllowedError * @private * @desc Error trying to make a connection when disabled external access. * @class * @example * nock.
lib/intercept.js:35
FunctionOverriddenClientRequest
(...args)
lib/intercept.js:262
Method_read
(_size)
lib/playback_interceptor.js:82
Method_read
(size)
tests/test_socket.js:86
FunctionactiveMocks
()
lib/intercept.js:365
FunctionafterRecord
()
tests/test_back.js:402
MethodbasicAuth
({ user, pass = '' })
lib/interceptor.js:467
Functionbefore
(def: nock.Definition)
types/tests.ts:755
FunctionblocklistFilter
(part)
lib/common.js:631
MethodbuildFilter
()
lib/scope.js:211
Functioncancel
()
lib/create_response.js:33
Functionclear
()
lib/recorder.js:341
Methodconstructor
(basePath, options)
lib/scope.js:74
Methodconstructor
(options)
lib/socket.js:7
Methodconstructor
* * Valid argument types for `uri`: * - A string used for strict comparisons with pathname. * The search portion of the URI may also be p
lib/interceptor.js:29
Methodconstructor
({ req, options, interceptors })
lib/intercepted_request_router.js:31
Methodconstructor
(buffers, opts = {})
lib/playback_interceptor.js:76
Methodconstructor
(content)
tests/test_socket.js:80
FunctioncontentEncoding
(headers, encoder)
lib/common.js:102
FunctioncontinueWithFullResponse
(fullReplyResult)
lib/playback_interceptor.js:231
FunctionconvertFetchRequestToClientRequest
* @param {Request} request
lib/common.js:585
FunctiondataEqual
(expected, actual)
lib/common.js:481
MethoddefaultReplyHeaders
(headers)
lib/scope.js:259
FunctiondefaultRequestListener
(req, res)
tests/servers/index.js:29
Methoddelay
* Delay the response by a certain number of ms. * * @param {(integer|object)} opts - Number of milliseconds to wait, or an object * @param {i
lib/interceptor.js:584
MethoddelayBody
* Delay the response body by a certain number of ms. * * @param {integer} ms - Number of milliseconds to wait before response is sent * @retu
lib/interceptor.js:606
FunctiondeleteHeadersField
* Deletes the given `fieldName` property from `headers` object by performing * case-insensitive search through keys. * * @headers {Object} header
lib/common.js:289
Methoddone
()
lib/scope.js:204
MethodfilteringPath
()
lib/scope.js:233
MethodfilteringPath
(...args)
lib/interceptor.js:444
MethodfilteringRequestBody
()
lib/scope.js:243
FunctionformatQueryValue
* Formats a query parameter. * * @param key The key of the query parameter to format. * @param value The value of the q
lib/common.js:364
FunctiongenerateRequestAndResponse
({ req, bodyChunks, options, res, dataChunks, reqheaders, })
lib/recorder.js:96
FunctiongenerateRequestAndResponseObject
({ req, bodyChunks, options, res, dataChunks, reqheaders, })
lib/recorder.js:66
FunctionheadersArrayToObject
* Converts an array of raw headers to an object, using the same rules as Nodes `http.IncomingMessage.headers`. * * Header names/keys are lower-cased
lib/common.js:192
FunctionheadersFieldNamesToLowerCase
* Return a new object with all field names of the headers lower-cased. * * Duplicates throw an error.
lib/common.js:118
FunctionheadersFieldsArrayToLowerCase
lib/common.js:143
FunctionheadersInputToRawArray
* Converts the various accepted formats of headers into a flat array representing "raw headers". * * Nock allows headers to be provided as a raw arr
lib/common.js:157
Functionignore
()
tests/got/test_events.js:11
FunctionisActive
()
lib/intercept.js:345
FunctionisContentEncoded
(headers)
lib/common.js:97
FunctionisDone
()
lib/intercept.js:357
FunctionisJSONContent
(headers)
lib/common.js:107
FunctionisRequestDestroyed
* Check if the Client Request has been cancelled. * * Until Node 14 is the minimum, we need to look at both flags to see if the request has been can
lib/common.js:574
FunctionisStream
(obj)
lib/common.js:403
FunctionisUtf8Representable
* Returns true if the data contained in buffer can be reconstructed * from its utf8 representation. * * @param {Object} buffer - a Buffer object
lib/common.js:48
Functionload
(path)
lib/scope.js:304
MethodmatchHeader
(name: string, value: RequestHeaderMatcher)
types/index.d.ts:199
FunctionmatchOrigin
()
lib/intercept.js:190
FunctionmatchStringOrRegexp
(target, pattern)
lib/common.js:342
FunctionnormalizeClientRequestArgs
* Converts the arguments from the various signatures of http[s].request into a standard * options object and an optional callback function. * * htt
lib/common.js:421
FunctionnormalizeRequestOptions
* Normalizes the request options so that it always has `host` property. * * @param {Object} options - a parsed options object of the request
lib/common.js:14
FunctionnullAppender
(content: string)
types/tests.ts:720
FunctiononTimeout
()
tests/test_socket.js:33
Methodonce
* An sugar syntax for times(1) * @name once * @see {@link times} * @public * @example * nock('http://zombo.com).get('/').once().reply(2
lib/interceptor.js:548
Methodoptionally
(flag = true)
lib/interceptor.js:91
← previousnext →101–200 of 226, ranked by callers