MCPcopy Create free account

hub / github.com/nock/nock / functions

Functions226 in github.com/nock/nock

↓ 54 callersMethodget
(uri, requestBody, options)
lib/scope.js:145
↓ 52 callersMethodreply
( replyFnWithCallback: ( this: ReplyFnContext, uri: string, body: Body,
types/index.d.ts:149
↓ 39 callersMethoddone
()
types/index.d.ts:129
↓ 22 callersMethodpost
(uri, requestBody, options)
lib/scope.js:149
↓ 18 callersMethodonce
()
types/index.d.ts:203
↓ 17 callersMethodisDone
()
types/index.d.ts:130
↓ 15 callersMethodwrite
()
lib/socket.js:43
↓ 12 callersMethodintercept
(uri, method, requestBody, interceptorOptions)
lib/scope.js:132
↓ 8 callersMethoddestroy
* Denotes that no more I/O activity should happen on this socket. * * The implementation in Node if far more complex as it juggles underlying as
lib/socket.js:88
↓ 8 callersFunctionlog
(emitter, name)
examples/_log.js:5
↓ 8 callersMethodresume
()
lib/socket.js:40
↓ 8 callersMethodsetTimeout
(timeoutMs, fn)
lib/socket.js:53
↓ 7 callersMethoddelayConnection
@deprecated use delay function instead
types/index.d.ts:215
↓ 7 callersMethodtimes
(newCounter: number)
types/index.d.ts:202
↓ 6 callersMethodaddress
()
lib/socket.js:45
↓ 6 callersMethoddelay
(opts: number)
types/index.d.ts:208
↓ 6 callersFunctionisPlainObject
* Returns true if the given value is a plain object and not an Array. * @param {*} value * @returns {boolean}
lib/common.js:612
↓ 6 callersMethodpendingMocks
()
types/index.d.ts:131
↓ 6 callersMethodpersist
(flag?: boolean)
types/index.d.ts:125
↓ 6 callersMethodquery
( matcher: | boolean | string | DataMatcherMap | URLSearchParams
types/index.d.ts:136
↓ 6 callersMethodreplyWithFile
( statusCode: StatusCode, fileName: string, headers?: ReplyHeaders, )
types/index.d.ts:193
↓ 6 callersFunctionstartHttpServer
(requestListener = defaultRequestListener)
tests/servers/index.js:35
↓ 5 callersMethodactiveMocks
()
types/index.d.ts:132
↓ 5 callersMethodclear
()
types/index.d.ts:228
↓ 5 callersMethodfilteringRequestBody
(regex: RegExp, replace: string)
types/index.d.ts:120
↓ 5 callersMethodmatch
(req, options, body)
lib/interceptor.js:250
↓ 5 callersFunctionnockDone
()
lib/back.js:75
↓ 5 callersMethodsetMode
(mode: BackMode)
types/index.d.ts:263
↓ 4 callersMethodadd
(key, interceptor)
lib/scope.js:105
↓ 4 callersMethodassertScopesFinished
()
types/index.d.ts:295
↓ 4 callersMethodclone
()
lib/scope.js:290
↓ 4 callersMethoddelayBody
@deprecated use delay function instead
types/index.d.ts:213
↓ 4 callersMethodfilteringPath
(regex: RegExp, replace: string)
types/index.d.ts:118
↓ 4 callersFunctionisOn
()
lib/intercept.js:97
↓ 3 callersFunctionafter
(scope: nock.Scope)
types/tests.ts:761
↓ 3 callersMethodbasicAuth
(options: { user: string; pass?: string })
types/index.d.ts:200
↓ 3 callersFunctioncb
()
tests/test_common.js:492
↓ 3 callersMethoddelete
(uri, requestBody, options)
lib/scope.js:169
↓ 3 callersFunctioninterceptorScopes
()
lib/intercept.js:349
↓ 3 callersFunctionisOff
()
lib/intercept.js:101
↓ 3 callersFunctionloadDefs
(path)
lib/scope.js:295
↓ 3 callersMethodmaybeStartPlayback
()
lib/intercepted_request_router.js:252
↓ 3 callersMethodpatch
(uri, requestBody, options)
lib/scope.js:161
↓ 3 callersMethodplay
()
types/index.d.ts:229
↓ 3 callersMethodrec
(options?: boolean | RecorderOptions)
types/index.d.ts:227
↓ 3 callersMethodremove
(key, interceptor)
lib/scope.js:119
↓ 3 callersMethodreplyContentLength
()
types/index.d.ts:126
↓ 3 callersMethodreplyWithError
(errorMessage: string | object)
types/index.d.ts:192
↓ 3 callersMethodtimes
* Set number of times will repeat the interceptor * @name times * @param newCounter Number of times to repeat (should be > 0) * @public *
lib/interceptor.js:530
↓ 3 callersMethodtwice
()
types/index.d.ts:204
↓ 2 callersFunctioncb
(...callbackArgs)
lib/common.js:527
↓ 2 callersFunctioncheckDuration
(start, durationMillis)
tests/got/test_delay.js:23
↓ 2 callersFunctioncontinueWithResponseBody
(rawBody)
lib/playback_interceptor.js:273
↓ 2 callersMethoddefaultReplyHeaders
(headers: ReplyHeaders)
types/index.d.ts:116
↓ 2 callersFunctiondefine
(nockDefs)
lib/scope.js:350
↓ 2 callersFunctionexpand
lib/common.js:643
↓ 2 callersFunctionfixtureExists
(fixture)
lib/back.js:300
↓ 2 callersFunctiongetBodyFromChunks
(chunks, headers)
lib/recorder.js:28
↓ 2 callersFunctiongetMethod
(options)
lib/recorder.js:24
↓ 2 callersFunctiongetScope
(options)
lib/recorder.js:19
↓ 2 callersMethodhead
(uri, requestBody, options)
lib/scope.js:157
↓ 2 callersFunctioninterceptorsFor
* Return all the Interceptors whose Scopes match against the base path of the provided options. * * @returns {Interceptor[]}
lib/intercept.js:154
↓ 2 callersFunctionisEnabledForNetConnect
(options)
lib/intercept.js:79
↓ 2 callersMethodmatchHeader
(name: string, value: RequestHeaderMatcher)
types/index.d.ts:117
↓ 2 callersMethodmerge
(uri, requestBody, options)
lib/scope.js:165
↓ 2 callersMethodoptionally
(flag?: boolean)
types/index.d.ts:206
↓ 2 callersMethodoptions
(uri, requestBody, options)
lib/scope.js:173
↓ 2 callersMethodpendingMocks
()
lib/scope.js:180
↓ 2 callersMethodput
(uri, requestBody, options)
lib/scope.js:153
↓ 2 callersMethodreplyDate
(d?: Date)
types/index.d.ts:127
↓ 2 callersFunctionrestoreOverriddenClientRequest
()
lib/intercept.js:329
↓ 2 callersMethodshouldPersist
* @private * @returns {boolean}
lib/scope.js:276
↓ 2 callersMethodthrice
()
types/index.d.ts:205
↓ 2 callersFunctionurlToOptions
* Utility function that converts a URL object into an ordinary * options object as expected by the http.request and https.request APIs. * * This wa
lib/common.js:449
↓ 1 callersFunctionactivate
()
lib/intercept.js:369
↓ 1 callersMethodactiveMocks
()
lib/scope.js:192
↓ 1 callersFunctionaddHeaderLine
* Set key/value data in accordance with Node's logic for folding duplicate headers. * * The `value` param should be a function, string, or array of
lib/common.js:247
↓ 1 callersFunctionaddInterceptor
(key, interceptor, scope, scopeOptions, host)
lib/intercept.js:105
↓ 1 callersMethodapplyDelay
* Artificial delay that will trip socket timeouts when appropriate. * * Doesn't actually wait for time to pass. * Timeout events don't necess
lib/socket.js:68
↓ 1 callersFunctionapplyHook
(scopes, fn)
lib/back.js:288
↓ 1 callersFunctionassertScopes
(scopes, fixture)
lib/back.js:308
↓ 1 callersMethodattachToReq
()
lib/intercepted_request_router.js:76
↓ 1 callersFunctionbefore
(scope)
tests/got/test_back_filters.js:35
↓ 1 callersFunctionclearTimer
(clear, ids)
lib/common.js:543
↓ 1 callersMethodconnectSocket
()
lib/intercepted_request_router.js:107
↓ 1 callersFunctionconvertBodyToStream
(body)
lib/playback_interceptor.js:92
↓ 1 callersFunctioncreateResponse
* @param {import('http').IncomingMessage} message * @param {AbortSignal} signal
lib/create_response.js:21
↓ 1 callersFunctiondeepEqual
* Performs a recursive strict comparison between two values. * * Expected values or leaf nodes of expected object values that are RegExp use test()
lib/common.js:496
↓ 1 callersMethoddelayConnection
* Delay the connection by a certain number of ms. * * @param {integer} ms - Number of milliseconds to wait * @return {Interceptor} - the cur
lib/interceptor.js:617
↓ 1 callersFunctiondisableNetConnect
* Disable all real requests. * @public * @example * nock.disableNetConnect();
lib/intercept.js:93
↓ 1 callersFunctionenableNetConnect
* Enabled real request. * @public * @param {String|RegExp} matcher=RegExp.new('.*') Expression to match * @example * // Enables all real requests
lib/intercept.js:67
↓ 1 callersFunctionextractLines
(chunks)
tests/got/test_logging.js:91
↓ 1 callersFunctionforEachHeader
* Utility for iterating over a raw headers array. * * The callback is called with: * - The header value. string, array of strings, or a function
lib/common.js:314
↓ 1 callersFunctiongetFixtureContent
()
tests/got/test_back_filters.js:19
↓ 1 callersMethodgetPeerCertificate
()
lib/socket.js:75
↓ 1 callersFunctiongetScopeFromDefinition
(nockDef)
lib/scope.js:323
↓ 1 callersFunctiongetStatusFromDefinition
(nockDef)
lib/scope.js:308
↓ 1 callersMethodhandleEnd
(chunk, encoding, callback)
lib/intercepted_request_router.js:190
↓ 1 callersMethodhandleFlushHeaders
()
lib/intercepted_request_router.js:216
↓ 1 callersMethodhandleWrite
(...args)
lib/intercepted_request_router.js:141
next →1–100 of 226, ranked by callers