@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.
33 lines (32 loc) • 931 B
TypeScript
import { TapTools } from './tapbundle.classes.taptools.js';
import { HrtMeasurement } from '@push.rocks/smarttime';
export type TTestStatus = 'success' | 'error' | 'pending' | 'errorAfterSuccess' | 'timeout';
export interface ITestFunction<T> {
(tapTools?: TapTools): Promise<T>;
}
export declare class TapTest<T = unknown> {
description: string;
failureAllowed: boolean;
hrtMeasurement: HrtMeasurement;
parallel: boolean;
status: TTestStatus;
tapTools: TapTools;
testFunction: ITestFunction<T>;
testKey: number;
private testDeferred;
testPromise: Promise<TapTest<T>>;
private testResultDeferred;
testResultPromise: Promise<T>;
/**
* constructor
*/
constructor(optionsArg: {
description: string;
testFunction: ITestFunction<T>;
parallel: boolean;
});
/**
* run the test
*/
run(testKeyArg: number): Promise<void>;
}