fancy-test
Version:
extendable utilities for testing
84 lines (83 loc) • 1.9 kB
TypeScript
import { expect } from './chai';
import * as FancyTypes from './types';
export declare const fancy: FancyTypes.Base<FancyTypes.Context, {
skip: {
output: unknown;
args: [];
};
} & {
only: {
output: unknown;
args: [];
};
} & {
retries: {
output: unknown;
args: [count: number];
};
} & {
catch: {
output: {
error: Error;
};
args: [arg: string | RegExp | ((err: Error) => any), opts?: {
raiseIfNotThrown?: boolean | undefined;
} | undefined];
};
} & {
env: {
output: unknown;
args: [env: {
[k: string]: string | null | undefined;
}, opts?: FancyTypes.EnvOptions | undefined];
};
} & {
stub: {
output: {
stubs: any[];
};
args: [object: any, path: any, value: () => any];
};
} & {
stdin: {
output: unknown;
args: [input: string, delay?: number | undefined];
};
} & {
stderr: {
output: {
readonly stderr: string;
};
args: [opts?: {
print?: boolean | undefined;
stripColor?: boolean | undefined;
} | undefined];
};
} & {
stdout: {
output: {
readonly stdout: string;
};
args: [opts?: {
print?: boolean | undefined;
stripColor?: boolean | undefined;
} | undefined];
};
} & {
nock: {
output: {
nock: number;
};
args: [host: string, options: FancyTypes.NockOptions | FancyTypes.NockCallback, cb?: FancyTypes.NockCallback | undefined];
};
} & {
timeout: {
output: {
timeout: number;
};
args: [timeout?: number | undefined];
};
}>;
export declare type Fancy = typeof fancy;
export { expect, FancyTypes, };
export default fancy;