MCPcopy
hub / github.com/nock/nock / Scope

Interface Scope

types/index.d.ts:126–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124 }
125
126 interface Scope extends NodeJS.EventEmitter {
127 get: InterceptFunction
128 post: InterceptFunction
129 put: InterceptFunction
130 head: InterceptFunction
131 patch: InterceptFunction
132 merge: InterceptFunction
133 delete: InterceptFunction
134 options: InterceptFunction
135
136 intercept: (
137 uri: string | RegExp | { (uri: string): boolean },
138 method: string,
139 requestBody?: RequestBodyMatcher,
140 options?: Options,
141 ) => Interceptor
142
143 defaultReplyHeaders(headers: ReplyHeaders): this
144 matchHeader(name: string, value: RequestHeaderMatcher): this
145 filteringPath(regex: RegExp, replace: string): this
146 filteringPath(fn: (path: string) => string): this
147 filteringRequestBody(regex: RegExp, replace: string): this
148 filteringRequestBody(
149 fn: (body: string, recordedBody: string) => string,
150 ): this
151
152 persist(flag?: boolean): this
153 replyContentLength(): this
154 replyDate(d?: Date): this
155
156 done(): void
157 isDone(): boolean
158 pendingMocks(): string[]
159 activeMocks(): string[]
160 }
161
162 interface Interceptor {
163 query(

Callers 51

tests.tsFile · 0.65
tests.tsFile · 0.65
test_events.jsFile · 0.65
tests.tsFile · 0.65
filteringPathMethod · 0.65
test_scope.jsFile · 0.65
test_intercept.jsFile · 0.65
tests.tsFile · 0.65
afterFunction · 0.65
test_scope.jsFile · 0.65

Implementers 1

Scopelib/scope.js

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…