Searched refs:MockScope (Results 1 – 3 of 3) sorted by relevance
8 MockScope12 declare class MockScope<TData extends object = object> { class15 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;
18 class MockScope { class144 return new MockScope(newMockDispatch)157 return new MockScope(newMockDispatch)169 return new MockScope(newMockDispatch)206 module.exports.MockScope = MockScope
66 …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…