@push.rocks/tapbundle
Version:
A comprehensive testing automation library that provides a wide range of utilities and tools for TAP (Test Anything Protocol) based testing, especially suitable for projects using tapbuffer.
28 lines (27 loc) • 929 B
TypeScript
import * as plugins from './tapbundle.plugins.js';
import { TapTest } from './tapbundle.classes.taptest.js';
export interface IPromiseFunc {
(): Promise<any>;
}
export declare class TapTools {
/**
* the referenced TapTest
*/
private _tapTest;
constructor(TapTestArg: TapTest<any>);
/**
* allow failure
*/
allowFailure(): void;
/**
* async/await delay method
*/
delayFor(timeMilliArg: number): Promise<void>;
delayForRandom(timeMilliMinArg: number, timeMilliMaxArg: number): Promise<void>;
coloredString(...args: Parameters<typeof plugins.consolecolor.coloredString>): Promise<string>;
timeout(timeMilliArg: number): Promise<void>;
returnError(throwingFuncArg: IPromiseFunc): Promise<Error>;
defer(): plugins.smartpromise.Deferred<unknown>;
cumulativeDefer(): plugins.smartpromise.CumulativeDeferred;
smartjson: typeof plugins.smartjson;
}