2017-04-28 07:49:57 +00:00
|
|
|
import { TapTest, ITestFunction } from './tapbundle.classes.taptest';
|
2017-07-05 22:06:18 +00:00
|
|
|
import { TapWrap, ITapWrapFunction } from './tapbundle.classes.tapwrap';
|
2017-04-23 09:10:13 +00:00
|
|
|
export declare class Tap {
|
2017-07-05 22:06:18 +00:00
|
|
|
/**
|
|
|
|
* skip a test
|
|
|
|
*/
|
2017-04-28 09:00:22 +00:00
|
|
|
skip: {
|
2017-07-05 22:06:18 +00:00
|
|
|
test: (descriptionArg: string, functionArg: ITestFunction) => void;
|
2017-04-28 09:00:22 +00:00
|
|
|
};
|
2017-07-11 13:10:05 +00:00
|
|
|
private _tapTests;
|
2017-04-23 12:35:16 +00:00
|
|
|
/**
|
|
|
|
* Normal test function, will run one by one
|
|
|
|
* @param testDescription - A description of what the test does
|
|
|
|
* @param testFunction - A Function that returns a Promise and resolves or rejects
|
|
|
|
*/
|
2017-04-28 07:49:57 +00:00
|
|
|
test(testDescription: string, testFunction: ITestFunction): Promise<TapTest>;
|
2017-07-05 22:06:18 +00:00
|
|
|
/**
|
|
|
|
* wraps function
|
|
|
|
*/
|
|
|
|
wrap(functionArg: ITapWrapFunction): TapWrap;
|
2017-04-23 12:35:16 +00:00
|
|
|
/**
|
|
|
|
* A parallel test that will not be waited for before the next starts.
|
|
|
|
* @param testDescription - A description of what the test does
|
|
|
|
* @param testFunction - A Function that returns a Promise and resolves or rejects
|
|
|
|
*/
|
2017-04-23 09:10:13 +00:00
|
|
|
testParallel(testDescription: string, testFunction: ITestFunction): void;
|
|
|
|
/**
|
|
|
|
* starts the test evaluation
|
|
|
|
*/
|
2017-07-11 13:10:05 +00:00
|
|
|
start(optionsArg?: {
|
|
|
|
throwOnError: boolean;
|
|
|
|
}): Promise<void>;
|
2017-04-23 09:10:13 +00:00
|
|
|
/**
|
|
|
|
* handle errors
|
|
|
|
*/
|
|
|
|
threw(err: any): void;
|
|
|
|
}
|
|
|
|
export declare let tap: Tap;
|