Home
last modified time | relevance | path

Searched refs:MockScope (Results 1 – 3 of 3) sorted by relevance

/third_party/node/deps/undici/src/types/
Dmock-interceptor.d.ts8 MockScope
12 declare class MockScope<TData extends object = object> { class
15 delay(waitInMs: number): MockScope<TData>;
17 persist(): MockScope<TData>;
19 times(repeatTimes: number): MockScope<TData>;
26 …= object>(replyOptionsCallback: MockInterceptor.MockReplyOptionsCallback<TData>): MockScope<TData>;
31 ): MockScope<TData>;
33 replyWithError<TError extends Error = Error>(error: TError): MockScope;
/third_party/node/deps/undici/src/lib/mock/
Dmock-interceptor.js18 class MockScope { class
144 return new MockScope(newMockDispatch)
157 return new MockScope(newMockDispatch)
169 return new MockScope(newMockDispatch)
206 module.exports.MockScope = MockScope
/third_party/node/deps/undici/src/docs/api/
DMockPool.md66 …ptor.MockResponseDataHandler, responseOptions?: MockResponseOptions) => MockScope` - define a repl…
67 * **reply** `(callback: MockInterceptor.MockReplyOptionsCallback) => MockScope` - define a reply fo…
68 * **replyWithError** `(error: Error) => MockScope` - define an error for a matching request to thro…
75 …nly. Subsequent requests will not be affected (this can be changed using the returned `MockScope`).
82 ### Return: `MockScope`
84 A `MockScope` is associated with a single `MockInterceptor`. With this, we can configure the defaul…
86 * **delay** `(waitInMs: number) => MockScope` - delay the associated reply by a set amount in ms.
87 * **persist** `() => MockScope` - any matching request will always reply with the defined response …
88 * **times** `(repeatTimes: number) => MockScope` - any matching request will reply with the defined…