/// /** Type for a callback that receives an optional error as the first argument */ type Errback = (error?: Error) => void; /** Alias for setTimeout with paramaters reversed. */ export declare function wait(delay: number, fn: (...args: any[]) => void): NodeJS.Timeout; /** Whether or not we are running in the node environment */ export declare function isNode(): boolean; /** Whether or not stdout and stderr are interactive. */ export declare function isTTY(): boolean; /** Convert a value to its boolean equivalent */ export declare function bool(value: any): boolean | null; /** Whether or not colors are desired on this environment */ export declare function useColors(): boolean; /** Applies the color to the value if desired */ export declare function color(value: any, color: Function): string; /** * Return a stringified version of the value with indentation and colors where applicable. * Colors will be applied if the environment supports it (--no-colors not present and TTY). * For the available options, refer to https://nodejs.org/dist/latest-v14.x/docs/api/util.html#util_util_inspect_object_options for Node.js */ export declare function inspect(value: any, opts?: any): string; /** Log the inspected values of each of the arguments to stdout */ export declare function log(...args: any): void; /** Output a comparison of the failed result to stderr */ export declare function logComparison(actual: any, expected: any, error: Error | string | any): void; /** Same as assert.strictEqual in that it performs a strict equals check, but if a failure occurs it will output detailed information */ export declare function equal(actual: any, expected: any, testName?: string, next?: Errback): void | never; /** Is greater than or equal to */ export declare function gte(actual: any, expected: any, testName?: string, next?: Errback): void | never; /** Is less than or equal to */ export declare function lte(actual: any, expected: any, testName?: string, next?: Errback): void | never; /** Is greater than */ export declare function gt(actual: any, expected: any, testName?: string, next?: Errback): void | never; /** Is less than */ export declare function lt(actual: any, expected: any, testName?: string, next?: Errback): void | never; /** Ensure what is passed is undefined, otherwise fail and output what it is */ export declare function undef(actual: any, testName?: string, next?: Errback): void; /** Ensure what is passed is undefined or null, otherwise fail and output what it is */ export declare function nullish(actual: any, testName?: string, next?: Errback): void; /** Same as assert.deepStrictEqual in that it performs a deep strict equals check, but if a failure occurs it will output detailed information */ export declare function deepEqual(actual: any, expected: any, testName?: string, next?: Errback): void | never; /** Checks to see if the actual result contains the expected result .*/ export declare function contains(actual: any, expected: any, testName?: string, next?: Errback): void | never; /** Checks to see if an error was as expected, if a failure occurs it will output detailed information */ export declare function errorEqual(actualError: any, expectedError: any, testName?: string, next?: Errback): void | never; /** Generate a callback that will return the specified value. */ export declare function returnViaCallback(value: any): () => typeof value; /** Generate a callback that will receive a completion callback whcih it will call with the specified result after the specified delay. */ export declare function completeViaCallback(value: any, delay?: number): (complete: (error: null, result: typeof value) => void) => void; /** Generate a callback that will receive a completion callback which it will call with the passed error after the specified delay. */ export declare function errorViaCallback(error: Error | string, delay?: number): (complete: (error: Error | string) => void) => void; /** Generate a callback that return an error instance with the specified message/error. */ export declare function returnErrorViaCallback(error?: Error | string): () => Error; /** Generate a callback that throw an error instance with the specified message/error. */ export declare function throwErrorViaCallback(error?: Error | string): () => never; /** Generate a callback that will check the arguments it received with the arguments specified, if a failure occurs it will output detailed information. */ export declare function expectViaCallback(...expected: any): (...actual: any) => void; /** * Generate a callback that will check its error (the actual error) against the passed error (the expected error). * If a failure occurs it will output detailed information. */ export declare function expectErrorViaCallback(expected: Error | string, testName?: string, next?: Errback): (actual: Error | string) => void; /** Expect the passed function to throw an error at some point. */ export declare function expectThrowViaFunction(expected: Error | string, fn: () => never, testName?: string, next?: Errback): void; /** @deprecated Use {@link expectErrorViaFunction} instead */ export declare function expectErrorViaFunction(): never; /** @deprecated Use {@link expectErrorViaFunction} instead */ export declare function expectFunctionToThrow(): never; export {}; //# sourceMappingURL=index.d.ts.map