Sha256: 9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a

Contents?: true

Size: 1002 Bytes

Versions: 29

Compression:

Stored size: 1002 Bytes

Contents

import Client from './client'
import Dispatcher from './dispatcher'
import MockAgent from './mock-agent'
import { MockInterceptor, Interceptable } from './mock-interceptor'

export default MockClient

/** MockClient extends the Client API and allows one to mock requests. */
declare class MockClient extends Client implements Interceptable {
  constructor(origin: string, options: MockClient.Options);
  /** Intercepts any matching requests that use the same origin as this mock client. */
  intercept(options: MockInterceptor.Options): MockInterceptor;
  /** Dispatches a mocked request. */
  dispatch(options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandlers): boolean;
  /** Closes the mock client and gracefully waits for enqueued requests to complete. */
  close(): Promise<void>;
}

declare namespace MockClient {
  /** MockClient options. */
  export interface Options extends Client.Options {
    /** The agent to associate this MockClient with. */
    agent: MockAgent;
  }
}

Version data entries

29 entries across 29 versions & 3 rubygems

Version Path
clapton-0.0.26 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.25 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.24 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.23 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.22 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.21 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.20 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.19 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.18 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.17 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.16 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.15 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.14 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.13 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.12 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.11 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.10 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.9 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.8 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts
clapton-0.0.7 lib/clapton/javascripts/node_modules/undici-types/mock-client.d.ts