/// export declare type PluginBuilder = (...args: Args) => Plugin; import Nock = require('nock'); export interface Context { test: (typeof it | typeof it.skip); plugins: { [k: string]: PluginBuilder; }; expectation?: string; chain: Plugin[]; error?: Error & { code?: string; }; retries?: number; timeout?: number; } export interface Plugin { run?(context: I): any; init?(context: I): any; finally?(context: I): any; catch?(context: I): any; } export interface PluginDef { output: object | unknown; args: any[]; } export interface Plugins { [k: string]: PluginDef; } export interface ITestCallbackContext { skip(): this; timeout(ms: number | string): this; retries(n: number): this; slow(ms: number): this; [index: string]: any; } export declare type MochaCallback = (this: ITestCallbackContext, context: I, done: MochaDone) => any; export interface It { (expectation: string, cb?: MochaCallback): void; (cb?: MochaCallback): void; } export declare type Base = { it: It; end: It; add(key: K, cb: ((context: I) => Promise | O) | Promise | O): Base; do(cb: (context: I & O) => any): Base; finally(cb: (context: I) => any): Base; register(key: K, plugin: (...args: A) => Plugin): Base; } & { [P in keyof T]: (...args: T[P]['args']) => Base; }; export interface EnvOptions { clear?: boolean; } export declare type MochaDone = (err?: any) => void; export interface NockScope extends Nock.Scope { } export interface NockOptions extends Nock.Options { } export declare type NockCallback = (nock: NockScope) => any;