source: imaps-frontend/node_modules/undici-types/mock-pool.d.ts

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 974 bytes
Line 
1import Pool from './pool'
2import MockAgent from './mock-agent'
3import { Interceptable, MockInterceptor } from './mock-interceptor'
4import Dispatcher from './dispatcher'
5
6export default MockPool
7
8/** MockPool extends the Pool API and allows one to mock requests. */
9declare class MockPool extends Pool implements Interceptable {
10 constructor(origin: string, options: MockPool.Options);
11 /** Intercepts any matching requests that use the same origin as this mock pool. */
12 intercept(options: MockInterceptor.Options): MockInterceptor;
13 /** Dispatches a mocked request. */
14 dispatch(options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandlers): boolean;
15 /** Closes the mock pool and gracefully waits for enqueued requests to complete. */
16 close(): Promise<void>;
17}
18
19declare namespace MockPool {
20 /** MockPool options. */
21 export interface Options extends Pool.Options {
22 /** The agent to associate this MockPool with. */
23 agent: MockAgent;
24 }
25}
Note: See TracBrowser for help on using the repository browser.