Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
3bbca9b0b4 | |||
f16e25b413 | |||
36574d0f34 | |||
12ac28ba44 | |||
1c80c25b14 | |||
03614fe2ef | |||
8be85e1b35 | |||
baf56089d7 | |||
42cd52a2f3 | |||
140f8a2499 | |||
952b6ec2a4 | |||
c8f2a76422 | |||
e640059715 |
16
README.md
16
README.md
@ -18,22 +18,6 @@ tap bundled for tapbuffer
|
|||||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||||
[](http://standardjs.com/)
|
[](http://standardjs.com/)
|
||||||
|
|
||||||
## Usage
|
|
||||||
Use TypeScript for best in class instellisense.
|
|
||||||
|
|
||||||
note this package includes
|
|
||||||
|
|
||||||
* tap
|
|
||||||
* chai
|
|
||||||
* chai-as-promised
|
|
||||||
* @types/tap
|
|
||||||
* @types/chai
|
|
||||||
* @types/chai-as-promised
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
import {tap, expect} from 'tapbundle' // has typings in place
|
|
||||||
```
|
|
||||||
|
|
||||||
For further information read the linked docs at the top of this README.
|
For further information read the linked docs at the top of this README.
|
||||||
|
|
||||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
|
2
dist/index.d.ts
vendored
2
dist/index.d.ts
vendored
@ -1,4 +1,4 @@
|
|||||||
import 'typings-global';
|
import 'typings-global';
|
||||||
import { expect } from 'smartchai';
|
import { expect } from 'smartchai';
|
||||||
import { tap } from './tapbundle.tap';
|
import { tap } from './tapbundle.classes.tap';
|
||||||
export { tap, expect };
|
export { tap, expect };
|
||||||
|
6
dist/index.js
vendored
6
dist/index.js
vendored
@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
require("typings-global");
|
require("typings-global");
|
||||||
const smartchai_1 = require("smartchai");
|
const smartchai_1 = require("smartchai");
|
||||||
exports.expect = smartchai_1.expect;
|
exports.expect = smartchai_1.expect;
|
||||||
const tapbundle_tap_1 = require("./tapbundle.tap");
|
const tapbundle_classes_tap_1 = require("./tapbundle.classes.tap");
|
||||||
exports.tap = tapbundle_tap_1.tap;
|
exports.tap = tapbundle_classes_tap_1.tap;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2Qix5Q0FBa0M7QUFNaEMsaUJBTk8sa0JBQU0sQ0FNUDtBQUxSLG1EQUFxQztBQUluQyxjQUpPLG1CQUFHLENBSVAifQ==
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2Qix5Q0FBa0M7QUFLaEMsaUJBTE8sa0JBQU0sQ0FLUDtBQUpSLG1FQUE2QztBQUczQyxjQUhPLDJCQUFHLENBR1AifQ==
|
34
dist/tapbundle.classes.tap.d.ts
vendored
Normal file
34
dist/tapbundle.classes.tap.d.ts
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import { TapTest, ITestFunction } from './tapbundle.classes.taptest';
|
||||||
|
export declare class Tap {
|
||||||
|
skip: {
|
||||||
|
test: (...args: any[]) => void;
|
||||||
|
};
|
||||||
|
private _tests;
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
test(testDescription: string, testFunction: ITestFunction): Promise<TapTest>;
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
testParallel(testDescription: string, testFunction: ITestFunction): void;
|
||||||
|
/**
|
||||||
|
* tests leakage
|
||||||
|
* @param testDescription - A description of what the test does
|
||||||
|
* @param testFunction - A Function that returns a Promise and resolves or rejects
|
||||||
|
*/
|
||||||
|
testLeakage(testDescription: string, testFunction: ITestFunction): void;
|
||||||
|
/**
|
||||||
|
* starts the test evaluation
|
||||||
|
*/
|
||||||
|
start(): Promise<void>;
|
||||||
|
/**
|
||||||
|
* handle errors
|
||||||
|
*/
|
||||||
|
threw(err: any): void;
|
||||||
|
}
|
||||||
|
export declare let tap: Tap;
|
90
dist/tapbundle.classes.tap.js
vendored
Normal file
90
dist/tapbundle.classes.tap.js
vendored
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
"use strict";
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const tapbundle_classes_taptest_1 = require("./tapbundle.classes.taptest");
|
||||||
|
class Tap {
|
||||||
|
constructor() {
|
||||||
|
this.skip = {
|
||||||
|
test: (...args) => {
|
||||||
|
console.log('skipped');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this._tests = [];
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
test(testDescription, testFunction) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
let localTest = new tapbundle_classes_taptest_1.TapTest({
|
||||||
|
description: testDescription,
|
||||||
|
testFunction: testFunction,
|
||||||
|
parallel: false
|
||||||
|
});
|
||||||
|
this._tests.push(localTest);
|
||||||
|
return localTest;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
testParallel(testDescription, testFunction) {
|
||||||
|
this._tests.push(new tapbundle_classes_taptest_1.TapTest({
|
||||||
|
description: testDescription,
|
||||||
|
testFunction: testFunction,
|
||||||
|
parallel: true
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* tests leakage
|
||||||
|
* @param testDescription - A description of what the test does
|
||||||
|
* @param testFunction - A Function that returns a Promise and resolves or rejects
|
||||||
|
*/
|
||||||
|
testLeakage(testDescription, testFunction) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* starts the test evaluation
|
||||||
|
*/
|
||||||
|
start() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
let promiseArray = [];
|
||||||
|
// safeguard against empty test array
|
||||||
|
if (this._tests.length === 0) {
|
||||||
|
console.log('no tests specified. Ending here!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.log(`1..${this._tests.length}`);
|
||||||
|
for (let testKey = 0; testKey < this._tests.length; testKey++) {
|
||||||
|
let currentTest = this._tests[testKey];
|
||||||
|
let testPromise = currentTest.run(testKey);
|
||||||
|
if (currentTest.parallel) {
|
||||||
|
promiseArray.push(testPromise);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
yield testPromise;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
yield Promise.all(promiseArray);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* handle errors
|
||||||
|
*/
|
||||||
|
threw(err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.Tap = Tap;
|
||||||
|
exports.tap = new Tap();
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLmNsYXNzZXMudGFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvdGFwYnVuZGxlLmNsYXNzZXMudGFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFFQSwyRUFBb0U7QUFFcEU7SUFBQTtRQUNFLFNBQUksR0FBRztZQUNMLElBQUksRUFBRSxDQUFDLEdBQUcsSUFBSTtnQkFDWixPQUFPLENBQUMsR0FBRyxDQUFDLFNBQVMsQ0FBQyxDQUFBO1lBQ3hCLENBQUM7U0FDRixDQUFBO1FBRU8sV0FBTSxHQUFjLEVBQUUsQ0FBQTtJQXNFaEMsQ0FBQztJQXBFQzs7OztPQUlHO0lBQ0csSUFBSSxDQUFDLGVBQXVCLEVBQUUsWUFBMkI7O1lBQzdELElBQUksU0FBUyxHQUFHLElBQUksbUNBQU8sQ0FBQztnQkFDMUIsV0FBVyxFQUFFLGVBQWU7Z0JBQzVCLFlBQVksRUFBRSxZQUFZO2dCQUMxQixRQUFRLEVBQUUsS0FBSzthQUNoQixDQUFDLENBQUE7WUFDRixJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQTtZQUMzQixNQUFNLENBQUMsU0FBUyxDQUFBO1FBQ2xCLENBQUM7S0FBQTtJQUVEOzs7O09BSUc7SUFDSCxZQUFZLENBQUMsZUFBdUIsRUFBRSxZQUEyQjtRQUMvRCxJQUFJLENBQUMsTUFBTSxDQUFDLElBQU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UM7Z0JBQUMsSUFBSSxDQUFDLENBQUM7b0JBQ04sTUFBTSxXQUFXLENBQUE7Z0JBQ25CLENBQUM7WUFDSCxDQUFDO1lBQ0QsTUFBTSxPQUFPLENBQUMsR0FBRyxDQUFDLFlBQVksQ0FBQyxDQUFBO1FBQ2pDLENBQUM7S0FBQTtJQUVEOztPQUVHO0lBQ0gsS0FBSyxDQUFDLEdBQUc7UUFDUCxPQUFPLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxDQUFBO0lBQ2xCLENBQUM7Q0FDRjtBQTdFRCxrQkE2RUM7QUFFVSxRQUFBLEdBQUcsR0FBRyxJQUFJLEdBQUcsRUFBRSxDQUFBIn0=
|
@ -1,13 +1,20 @@
|
|||||||
export declare type TTestStatus = 'success' | 'error' | 'pending';
|
import { TapTools } from './tapbundle.classes.taptools';
|
||||||
|
import { HrtMeasurement } from 'early';
|
||||||
|
import { Deferred } from 'smartq';
|
||||||
|
export declare type TTestStatus = 'success' | 'error' | 'pending' | 'errorAfterSuccess' | 'timeout';
|
||||||
export interface ITestFunction {
|
export interface ITestFunction {
|
||||||
(): Promise<any>;
|
(tapTools?: TapTools): Promise<any>;
|
||||||
}
|
}
|
||||||
export declare class TapTest {
|
export declare class TapTest {
|
||||||
description: string;
|
description: string;
|
||||||
testFunction: ITestFunction;
|
failureAllowed: boolean;
|
||||||
status: TTestStatus;
|
hrtMeasurement: HrtMeasurement;
|
||||||
parallel: boolean;
|
parallel: boolean;
|
||||||
returnValue: any;
|
status: TTestStatus;
|
||||||
|
tapTools: TapTools;
|
||||||
|
testFunction: ITestFunction;
|
||||||
|
testDeferred: Deferred<TapTest>;
|
||||||
|
testPromise: Promise<TapTest>;
|
||||||
/**
|
/**
|
||||||
* constructor
|
* constructor
|
||||||
*/
|
*/
|
||||||
@ -21,17 +28,3 @@ export declare class TapTest {
|
|||||||
*/
|
*/
|
||||||
run(testKeyArg: number): Promise<void>;
|
run(testKeyArg: number): Promise<void>;
|
||||||
}
|
}
|
||||||
export declare class Tap {
|
|
||||||
private _tests;
|
|
||||||
test(testDescription: string, testFunction: ITestFunction): Promise<void>;
|
|
||||||
testParallel(testDescription: string, testFunction: ITestFunction): void;
|
|
||||||
/**
|
|
||||||
* starts the test evaluation
|
|
||||||
*/
|
|
||||||
start(): Promise<void>;
|
|
||||||
/**
|
|
||||||
* handle errors
|
|
||||||
*/
|
|
||||||
threw(err: any): void;
|
|
||||||
}
|
|
||||||
export declare let tap: Tap;
|
|
64
dist/tapbundle.classes.taptest.js
vendored
Normal file
64
dist/tapbundle.classes.taptest.js
vendored
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
"use strict";
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const plugins = require("./tapbundle.plugins");
|
||||||
|
const tapbundle_classes_taptools_1 = require("./tapbundle.classes.taptools");
|
||||||
|
// imported interfaces
|
||||||
|
const early_1 = require("early");
|
||||||
|
class TapTest {
|
||||||
|
/**
|
||||||
|
* constructor
|
||||||
|
*/
|
||||||
|
constructor(optionsArg) {
|
||||||
|
this.testDeferred = plugins.smartq.defer();
|
||||||
|
this.testPromise = this.testDeferred.promise;
|
||||||
|
this.description = optionsArg.description;
|
||||||
|
this.hrtMeasurement = new early_1.HrtMeasurement();
|
||||||
|
this.parallel = optionsArg.parallel;
|
||||||
|
this.status = 'pending';
|
||||||
|
this.tapTools = new tapbundle_classes_taptools_1.TapTools(this);
|
||||||
|
this.testFunction = optionsArg.testFunction;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* run the test
|
||||||
|
*/
|
||||||
|
run(testKeyArg) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
this.hrtMeasurement.start();
|
||||||
|
try {
|
||||||
|
yield this.testFunction(this.tapTools);
|
||||||
|
if (this.status === 'timeout') {
|
||||||
|
throw new Error('Test succeeded, but timed out...');
|
||||||
|
}
|
||||||
|
this.hrtMeasurement.stop();
|
||||||
|
console.log(`ok ${testKeyArg + 1} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms`);
|
||||||
|
this.status = 'success';
|
||||||
|
this.testDeferred.resolve(this);
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
this.hrtMeasurement.stop();
|
||||||
|
console.log(`not ok ${testKeyArg + 1} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms`);
|
||||||
|
this.testDeferred.reject();
|
||||||
|
// if the test has already succeeded before
|
||||||
|
if (this.status === 'success') {
|
||||||
|
this.status = 'errorAfterSuccess';
|
||||||
|
console.log('!!! ALERT !!!: weird behaviour, since test has been already successfull');
|
||||||
|
}
|
||||||
|
// if the test is allowed to fail
|
||||||
|
if (this.failureAllowed) {
|
||||||
|
console.log(`please note: failure allowed!`);
|
||||||
|
}
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.TapTest = TapTest;
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLmNsYXNzZXMudGFwdGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3RhcGJ1bmRsZS5jbGFzc2VzLnRhcHRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLCtDQUE4QztBQUU5Qyw2RUFBdUQ7QUFFdk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0Y7QUExREQsMEJBMERDIn0=
|
16
dist/tapbundle.classes.taptools.d.ts
vendored
Normal file
16
dist/tapbundle.classes.taptools.d.ts
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
export declare class TapTools {
|
||||||
|
/**
|
||||||
|
* the referenced TapTest
|
||||||
|
*/
|
||||||
|
private _tapTest;
|
||||||
|
constructor(TapTestArg: any);
|
||||||
|
/**
|
||||||
|
* allow failure
|
||||||
|
*/
|
||||||
|
allowFailure(): void;
|
||||||
|
/**
|
||||||
|
* async/await delay method
|
||||||
|
*/
|
||||||
|
delayFor(timeMilliArg: any): Promise<void>;
|
||||||
|
timeout(timeMilliArg: number): Promise<void>;
|
||||||
|
}
|
40
dist/tapbundle.classes.taptools.js
vendored
Normal file
40
dist/tapbundle.classes.taptools.js
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
"use strict";
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const plugins = require("./tapbundle.plugins");
|
||||||
|
class TapTools {
|
||||||
|
constructor(TapTestArg) {
|
||||||
|
this._tapTest = TapTestArg;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* allow failure
|
||||||
|
*/
|
||||||
|
allowFailure() {
|
||||||
|
this._tapTest.failureAllowed = true;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* async/await delay method
|
||||||
|
*/
|
||||||
|
delayFor(timeMilliArg) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
yield plugins.smartdelay.delayFor(timeMilliArg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
timeout(timeMilliArg) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
yield plugins.smartdelay.delayFor(timeMilliArg);
|
||||||
|
if (this._tapTest.status === 'pending') {
|
||||||
|
this._tapTest.status = 'timeout';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.TapTools = TapTools;
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLmNsYXNzZXMudGFwdG9vbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy90YXBidW5kbGUuY2xhc3Nlcy50YXB0b29scy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEsK0NBQThDO0FBRzlDO0lBT0UsWUFBWSxVQUFVO1FBQ3BCLElBQUksQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFBO0lBQzVCLENBQUM7SUFFRDs7T0FFRztJQUNILFlBQVk7UUFDVixJQUFJLENBQUMsUUFBUSxDQUFDLGNBQWMsR0FBRyxJQUFJLENBQUE7SUFDckMsQ0FBQztJQUVEOztPQUVHO0lBQ0csUUFBUSxDQUFDLFlBQVk7O1lBQ3pCLE1BQU0sT0FBTyxDQUFDLFVBQVUsQ0FBQyxRQUFRLENBQUMsWUFBWSxDQUFDLENBQUE7UUFDakQsQ0FBQztLQUFBO0lBRUssT0FBTyxDQUFFLFlBQW9COztZQUNqQyxNQUFNLE9BQU8sQ0FBQyxVQUFVLENBQUMsUUFBUSxDQUFDLFlBQVksQ0FBQyxDQUFBO1lBQy9DLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsTUFBTSxLQUFLLFNBQVMsQ0FBQyxDQUFDLENBQUM7Z0JBQ3ZDLElBQUksQ0FBQyxRQUFRLENBQUMsTUFBTSxHQUFHLFNBQVMsQ0FBQTtZQUNsQyxDQUFDO1FBQ0gsQ0FBQztLQUFBO0NBRUY7QUFoQ0QsNEJBZ0NDIn0=
|
5
dist/tapbundle.plugins.d.ts
vendored
5
dist/tapbundle.plugins.d.ts
vendored
@ -1,3 +1,6 @@
|
|||||||
import 'typings-global';
|
import 'typings-global';
|
||||||
|
import * as early from 'early';
|
||||||
|
import * as leakage from 'leakage';
|
||||||
|
import * as smartdelay from 'smartdelay';
|
||||||
import * as smartq from 'smartq';
|
import * as smartq from 'smartq';
|
||||||
export { smartq };
|
export { early, smartdelay, smartq, leakage };
|
||||||
|
8
dist/tapbundle.plugins.js
vendored
8
dist/tapbundle.plugins.js
vendored
@ -1,6 +1,12 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
require("typings-global");
|
require("typings-global");
|
||||||
|
const early = require("early");
|
||||||
|
exports.early = early;
|
||||||
|
const leakage = require("leakage");
|
||||||
|
exports.leakage = leakage;
|
||||||
|
const smartdelay = require("smartdelay");
|
||||||
|
exports.smartdelay = smartdelay;
|
||||||
const smartq = require("smartq");
|
const smartq = require("smartq");
|
||||||
exports.smartq = smartq;
|
exports.smartq = smartq;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy90YXBidW5kbGUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2QixpQ0FBZ0M7QUFHOUIsd0JBQU0ifQ==
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy90YXBidW5kbGUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2QiwrQkFBOEI7QUFNNUIsc0JBQUs7QUFMUCxtQ0FBa0M7QUFRaEMsMEJBQU87QUFQVCx5Q0FBd0M7QUFLdEMsZ0NBQVU7QUFKWixpQ0FBZ0M7QUFLOUIsd0JBQU0ifQ==
|
91
dist/tapbundle.tap.js
vendored
91
dist/tapbundle.tap.js
vendored
@ -1,91 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
class TapTest {
|
|
||||||
/**
|
|
||||||
* constructor
|
|
||||||
*/
|
|
||||||
constructor(optionsArg) {
|
|
||||||
this.description = optionsArg.description;
|
|
||||||
this.testFunction = optionsArg.testFunction;
|
|
||||||
this.parallel = optionsArg.parallel;
|
|
||||||
this.status = 'pending';
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* run the test
|
|
||||||
*/
|
|
||||||
run(testKeyArg) {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
try {
|
|
||||||
yield this.testFunction();
|
|
||||||
console.log(`ok ${testKeyArg + 1} - ${this.description}`);
|
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
console.log(err);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exports.TapTest = TapTest;
|
|
||||||
class Tap {
|
|
||||||
constructor() {
|
|
||||||
this._tests = [];
|
|
||||||
}
|
|
||||||
test(testDescription, testFunction) {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
this._tests.push(new TapTest({
|
|
||||||
description: testDescription,
|
|
||||||
testFunction: testFunction,
|
|
||||||
parallel: false
|
|
||||||
}));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
testParallel(testDescription, testFunction) {
|
|
||||||
this._tests.push(new TapTest({
|
|
||||||
description: testDescription,
|
|
||||||
testFunction: testFunction,
|
|
||||||
parallel: true
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* starts the test evaluation
|
|
||||||
*/
|
|
||||||
start() {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
let promiseArray = [];
|
|
||||||
// safeguard against empty test array
|
|
||||||
if (this._tests.length === 0) {
|
|
||||||
console.log('no tests specified. Ending here!');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
console.log(`1..${this._tests.length}`);
|
|
||||||
for (let testKey = 0; testKey < this._tests.length; testKey++) {
|
|
||||||
let currentTest = this._tests[testKey];
|
|
||||||
let testPromise = currentTest.run(testKey);
|
|
||||||
if (currentTest.parallel) {
|
|
||||||
promiseArray.push(testPromise);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
yield testPromise;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
yield Promise.all(promiseArray);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* handle errors
|
|
||||||
*/
|
|
||||||
threw(err) {
|
|
||||||
console.log(err);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exports.Tap = Tap;
|
|
||||||
exports.tap = new Tap();
|
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLnRhcC5qcyIsInNvdXJjZVJvb3QiOiI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29CQUN6QixZQUFZLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxDQUFBO2dCQUNoQyxDQUFDO2dCQUFDLElBQUksQ0FBQyxDQUFDO29CQUNOLE1BQU0sV0FBVyxDQUFBO2dCQUNuQixDQUFDO1lBQ0gsQ0FBQztZQUNELE1BQU0sT0FBTyxDQUFDLEdBQUcsQ0FBQyxZQUFZLENBQUMsQ0FBQTtRQUNqQyxDQUFDO0tBQUE7SUFFRDs7T0FFRztJQUNILEtBQUssQ0FBRSxHQUFHO1FBQ1IsT0FBTyxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsQ0FBQTtJQUNsQixDQUFDO0NBQ0Y7QUFsREQsa0JBa0RDO0FBRVUsUUFBQSxHQUFHLEdBQUcsSUFBSSxHQUFHLEVBQUUsQ0FBQSJ9
|
|
3
dist/tapbundle.tapcreator.d.ts
vendored
Normal file
3
dist/tapbundle.tapcreator.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export declare class TapCreator {
|
||||||
|
}
|
||||||
|
export declare let tapCreator: TapCreator;
|
7
dist/tapbundle.tapcreator.js
vendored
Normal file
7
dist/tapbundle.tapcreator.js
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
class TapCreator {
|
||||||
|
}
|
||||||
|
exports.TapCreator = TapCreator;
|
||||||
|
exports.tapCreator = new TapCreator();
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLnRhcGNyZWF0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy90YXBidW5kbGUudGFwY3JlYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUVBO0NBRUM7QUFGRCxnQ0FFQztBQUVVLFFBQUEsVUFBVSxHQUFHLElBQUksVUFBVSxFQUFFLENBQUEifQ==
|
79
docs/index.md
Normal file
79
docs/index.md
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
# tapbundle
|
||||||
|
tap bundled for tapbuffer
|
||||||
|
|
||||||
|
## Availabililty
|
||||||
|
[](https://www.npmjs.com/package/tapbundle)
|
||||||
|
[](https://GitLab.com/pushrocks/tapbundle)
|
||||||
|
[](https://github.com/pushrocks/tapbundle)
|
||||||
|
[](https://pushrocks.gitlab.io/tapbundle/)
|
||||||
|
|
||||||
|
## Status for master
|
||||||
|
[](https://GitLab.com/pushrocks/tapbundle/commits/master)
|
||||||
|
[](https://GitLab.com/pushrocks/tapbundle/commits/master)
|
||||||
|
[](https://www.npmjs.com/package/tapbundle)
|
||||||
|
[](https://david-dm.org/pushrocks/tapbundle)
|
||||||
|
[](https://www.bithound.io/github/pushrocks/tapbundle/master/dependencies/npm)
|
||||||
|
[](https://www.bithound.io/github/pushrocks/tapbundle)
|
||||||
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||||
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||||
|
[](http://standardjs.com/)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
Use TypeScript for best in class instellisense.
|
||||||
|
|
||||||
|
This package includes
|
||||||
|
|
||||||
|
* tap compatible testing framework written in TypeScript
|
||||||
|
* npm package chai (through smartchai)
|
||||||
|
* npm package chai-as-promised (through smartchai)
|
||||||
|
* npm package chai-string (through smartchai)
|
||||||
|
* npm pacakge @types/chai (through smartchi)
|
||||||
|
* npm package @types/chai-as-promised (through smartchai)
|
||||||
|
* npm package @types/chai-string (through smartchai)
|
||||||
|
|
||||||
|
It also implements its own tap testing engine, that is fully typed.
|
||||||
|
|
||||||
|
In other words: This package is fully typed :)
|
||||||
|
|
||||||
|
|
||||||
|
### Get started with writing your first test file.
|
||||||
|
```javascript
|
||||||
|
import {tap, expect} from 'tapbundle' // has typings in place
|
||||||
|
|
||||||
|
import * as myAwesomeModuleToTest from '../dist/index' // '../dist/index' is the standard path for npmts modules
|
||||||
|
|
||||||
|
tap.test('my awesome description', async (tools) => { // tools are optional parameter
|
||||||
|
tools.timeout(2000) // test will fail if it takes longer than 2000 millisenconds
|
||||||
|
})
|
||||||
|
|
||||||
|
let myTest2 = tap.test('my awesome test 2', async (tools) => {
|
||||||
|
myAwsomeModuleToTest.doSomethingAsync() // we don't wait here
|
||||||
|
await tools.delayFor(3000) // yay. promise based timeouts :)
|
||||||
|
console.log('This gets logged 3000 ms into the test')
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('my awesome test 3', async (tools) => {
|
||||||
|
expect(true).to.be.true // will not throw
|
||||||
|
await expect(tools.delayFor(2000)).to.eventuall.be.fulfilled // yay expect promises :)
|
||||||
|
expect((await myTest2.promise).hrtMeasurement.milliSeconds > 1000).to.be.true // access other tests metadata :)
|
||||||
|
})
|
||||||
|
|
||||||
|
let myTest4 = tap.testParallel('my awesome test 4', async (tools) => {
|
||||||
|
await tools.delayFor(4000)
|
||||||
|
console.log('logs to console after 4 seconds into this test')
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('my awesome test 5', async () => {
|
||||||
|
expect(myTest4.status).to.equal('pending') // since this test will likely finish before myTest4.
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.start() // start the test, will automtically plan tests for you (so the tap parser knows when tests exit bofore they are finished)
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
For further information read the linked docs at the top of this README.
|
||||||
|
|
||||||
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||||
|
|
||||||
|
[](https://push.rocks)
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tapbundle",
|
"name": "tapbundle",
|
||||||
"version": "1.0.6",
|
"version": "1.0.11",
|
||||||
"description": "tap bundled for tapbuffer",
|
"description": "tap bundled for tapbuffer",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
@ -18,7 +18,10 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/pushrocks/tapbundle#README",
|
"homepage": "https://gitlab.com/pushrocks/tapbundle#README",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"early": "^2.1.1",
|
||||||
|
"leakage": "^0.2.0",
|
||||||
"smartchai": "^1.0.3",
|
"smartchai": "^1.0.3",
|
||||||
|
"smartdelay": "^1.0.1",
|
||||||
"smartq": "^1.1.1",
|
"smartq": "^1.1.1",
|
||||||
"typings-global": "^1.0.16"
|
"typings-global": "^1.0.16"
|
||||||
}
|
}
|
||||||
|
27
test/test.ts
27
test/test.ts
@ -1,7 +1,32 @@
|
|||||||
import { tap, expect } from '../dist/index'
|
import { tap, expect } from '../dist/index'
|
||||||
|
|
||||||
tap.test('my first test', async () => {
|
let test1 = tap.test('my first test -> expect true to be true', async () => {
|
||||||
return expect(true).to.be.true
|
return expect(true).to.be.true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let test2 = tap.test('my second test', async (tools) => {
|
||||||
|
await tools.delayFor(1000)
|
||||||
|
})
|
||||||
|
|
||||||
|
let test3 = tap.test('my third test -> test2 should take longer than test1 and endure at least 1000ms', async () => {
|
||||||
|
expect((await test1).hrtMeasurement.milliSeconds < (await test2).hrtMeasurement.milliSeconds).to.be.true
|
||||||
|
expect((await test2).hrtMeasurement.milliSeconds > 1000).to.be.true
|
||||||
|
})
|
||||||
|
|
||||||
|
let test4 = tap.skip.test('my 4th test -> should fail', async (tools) => {
|
||||||
|
tools.allowFailure()
|
||||||
|
expect(false).to.be.true
|
||||||
|
})
|
||||||
|
|
||||||
|
let test5 = tap.test('my 5th test -> should pass in about 500ms', async (tools) => {
|
||||||
|
tools.timeout(1000)
|
||||||
|
await tools.delayFor(500)
|
||||||
|
})
|
||||||
|
|
||||||
|
let test6 = tap.skip.test('my 6th test -> should fail after 1000ms', async (tools) => {
|
||||||
|
tools.allowFailure()
|
||||||
|
tools.timeout(1000)
|
||||||
|
await tools.delayFor(2000)
|
||||||
|
})
|
||||||
|
|
||||||
tap.start()
|
tap.start()
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
import 'typings-global'
|
import 'typings-global'
|
||||||
import { expect } from 'smartchai'
|
import { expect } from 'smartchai'
|
||||||
import { tap } from './tapbundle.tap'
|
import { tap } from './tapbundle.classes.tap'
|
||||||
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
tap,
|
tap,
|
||||||
expect
|
expect
|
||||||
}
|
}
|
||||||
|
85
ts/tapbundle.classes.tap.ts
Normal file
85
ts/tapbundle.classes.tap.ts
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
import * as plugins from './tapbundle.plugins'
|
||||||
|
|
||||||
|
import { TapTest, ITestFunction } from './tapbundle.classes.taptest'
|
||||||
|
|
||||||
|
export class Tap {
|
||||||
|
skip = {
|
||||||
|
test: (...args) => {
|
||||||
|
console.log('skipped')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private _tests: TapTest[] = []
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
async test(testDescription: string, testFunction: ITestFunction) {
|
||||||
|
let localTest = new TapTest({
|
||||||
|
description: testDescription,
|
||||||
|
testFunction: testFunction,
|
||||||
|
parallel: false
|
||||||
|
})
|
||||||
|
this._tests.push(localTest)
|
||||||
|
return localTest
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
testParallel(testDescription: string, testFunction: ITestFunction) {
|
||||||
|
this._tests.push(new TapTest({
|
||||||
|
description: testDescription,
|
||||||
|
testFunction: testFunction,
|
||||||
|
parallel: true
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tests leakage
|
||||||
|
* @param testDescription - A description of what the test does
|
||||||
|
* @param testFunction - A Function that returns a Promise and resolves or rejects
|
||||||
|
*/
|
||||||
|
testLeakage(testDescription: string, testFunction: ITestFunction) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* starts the test evaluation
|
||||||
|
*/
|
||||||
|
async start() {
|
||||||
|
let promiseArray: Promise<any>[] = []
|
||||||
|
|
||||||
|
// safeguard against empty test array
|
||||||
|
if (this._tests.length === 0) {
|
||||||
|
console.log('no tests specified. Ending here!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`1..${this._tests.length}`)
|
||||||
|
for (let testKey = 0; testKey < this._tests.length; testKey++) {
|
||||||
|
let currentTest = this._tests[ testKey ]
|
||||||
|
let testPromise = currentTest.run(testKey)
|
||||||
|
if (currentTest.parallel) {
|
||||||
|
promiseArray.push(testPromise)
|
||||||
|
} else {
|
||||||
|
await testPromise
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await Promise.all(promiseArray)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* handle errors
|
||||||
|
*/
|
||||||
|
threw(err) {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export let tap = new Tap()
|
||||||
|
|
75
ts/tapbundle.classes.taptest.ts
Normal file
75
ts/tapbundle.classes.taptest.ts
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
import * as plugins from './tapbundle.plugins'
|
||||||
|
import { tapCreator } from './tapbundle.tapcreator'
|
||||||
|
import { TapTools } from './tapbundle.classes.taptools'
|
||||||
|
|
||||||
|
// imported interfaces
|
||||||
|
import { HrtMeasurement } from 'early'
|
||||||
|
import { Deferred } from 'smartq'
|
||||||
|
|
||||||
|
// interfaces
|
||||||
|
export type TTestStatus = 'success' | 'error' | 'pending' | 'errorAfterSuccess' | 'timeout'
|
||||||
|
|
||||||
|
export interface ITestFunction {
|
||||||
|
(tapTools?: TapTools): Promise<any>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export class TapTest {
|
||||||
|
description: string
|
||||||
|
failureAllowed: boolean
|
||||||
|
hrtMeasurement: HrtMeasurement
|
||||||
|
parallel: boolean
|
||||||
|
status: TTestStatus
|
||||||
|
tapTools: TapTools
|
||||||
|
testFunction: ITestFunction
|
||||||
|
testDeferred: Deferred<TapTest> = plugins.smartq.defer()
|
||||||
|
testPromise: Promise<TapTest> = this.testDeferred.promise
|
||||||
|
/**
|
||||||
|
* constructor
|
||||||
|
*/
|
||||||
|
constructor (optionsArg: {
|
||||||
|
description: string,
|
||||||
|
testFunction: ITestFunction,
|
||||||
|
parallel: boolean
|
||||||
|
}) {
|
||||||
|
this.description = optionsArg.description
|
||||||
|
this.hrtMeasurement = new HrtMeasurement()
|
||||||
|
this.parallel = optionsArg.parallel
|
||||||
|
this.status = 'pending'
|
||||||
|
this.tapTools = new TapTools(this)
|
||||||
|
this.testFunction = optionsArg.testFunction
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* run the test
|
||||||
|
*/
|
||||||
|
async run (testKeyArg: number) {
|
||||||
|
this.hrtMeasurement.start()
|
||||||
|
try {
|
||||||
|
await this.testFunction(this.tapTools)
|
||||||
|
if (this.status === 'timeout') {
|
||||||
|
throw new Error ('Test succeeded, but timed out...')
|
||||||
|
}
|
||||||
|
this.hrtMeasurement.stop()
|
||||||
|
console.log(`ok ${testKeyArg + 1} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms`)
|
||||||
|
this.status = 'success'
|
||||||
|
this.testDeferred.resolve(this)
|
||||||
|
} catch (err) {
|
||||||
|
this.hrtMeasurement.stop()
|
||||||
|
console.log(`not ok ${testKeyArg + 1} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms`)
|
||||||
|
this.testDeferred.reject()
|
||||||
|
|
||||||
|
// if the test has already succeeded before
|
||||||
|
if (this.status === 'success') {
|
||||||
|
this.status = 'errorAfterSuccess'
|
||||||
|
console.log('!!! ALERT !!!: weird behaviour, since test has been already successfull')
|
||||||
|
}
|
||||||
|
|
||||||
|
// if the test is allowed to fail
|
||||||
|
if (this.failureAllowed) {
|
||||||
|
console.log(`please note: failure allowed!`)
|
||||||
|
}
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
36
ts/tapbundle.classes.taptools.ts
Normal file
36
ts/tapbundle.classes.taptools.ts
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import * as plugins from './tapbundle.plugins'
|
||||||
|
import { TapTest } from './tapbundle.classes.taptest'
|
||||||
|
|
||||||
|
export class TapTools {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the referenced TapTest
|
||||||
|
*/
|
||||||
|
private _tapTest: TapTest
|
||||||
|
|
||||||
|
constructor(TapTestArg) {
|
||||||
|
this._tapTest = TapTestArg
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* allow failure
|
||||||
|
*/
|
||||||
|
allowFailure() {
|
||||||
|
this._tapTest.failureAllowed = true
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* async/await delay method
|
||||||
|
*/
|
||||||
|
async delayFor(timeMilliArg) {
|
||||||
|
await plugins.smartdelay.delayFor(timeMilliArg)
|
||||||
|
}
|
||||||
|
|
||||||
|
async timeout (timeMilliArg: number) {
|
||||||
|
await plugins.smartdelay.delayFor(timeMilliArg)
|
||||||
|
if (this._tapTest.status === 'pending') {
|
||||||
|
this._tapTest.status = 'timeout'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,6 +1,12 @@
|
|||||||
import 'typings-global'
|
import 'typings-global'
|
||||||
|
import * as early from 'early'
|
||||||
|
import * as leakage from 'leakage'
|
||||||
|
import * as smartdelay from 'smartdelay'
|
||||||
import * as smartq from 'smartq'
|
import * as smartq from 'smartq'
|
||||||
|
|
||||||
export {
|
export {
|
||||||
smartq
|
early,
|
||||||
|
smartdelay,
|
||||||
|
smartq,
|
||||||
|
leakage
|
||||||
}
|
}
|
||||||
|
@ -1,98 +0,0 @@
|
|||||||
import * as plugins from './tapbundle.plugins'
|
|
||||||
|
|
||||||
// interfaces
|
|
||||||
export type TTestStatus = 'success' | 'error' | 'pending'
|
|
||||||
|
|
||||||
export interface ITestFunction {
|
|
||||||
(): Promise<any>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export class TapTest {
|
|
||||||
description: string
|
|
||||||
testFunction: ITestFunction
|
|
||||||
status: TTestStatus
|
|
||||||
parallel: boolean
|
|
||||||
returnValue
|
|
||||||
|
|
||||||
/**
|
|
||||||
* constructor
|
|
||||||
*/
|
|
||||||
constructor (optionsArg: {
|
|
||||||
description: string,
|
|
||||||
testFunction: ITestFunction,
|
|
||||||
parallel: boolean
|
|
||||||
}) {
|
|
||||||
this.description = optionsArg.description
|
|
||||||
this.testFunction = optionsArg.testFunction
|
|
||||||
this.parallel = optionsArg.parallel
|
|
||||||
this.status = 'pending'
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* run the test
|
|
||||||
*/
|
|
||||||
async run (testKeyArg: number) {
|
|
||||||
try {
|
|
||||||
await this.testFunction()
|
|
||||||
console.log(`ok ${testKeyArg + 1} - ${this.description}`)
|
|
||||||
} catch (err) {
|
|
||||||
console.log(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class Tap {
|
|
||||||
private _tests: TapTest[] = []
|
|
||||||
|
|
||||||
async test (testDescription: string, testFunction: ITestFunction) {
|
|
||||||
this._tests.push(new TapTest({
|
|
||||||
description: testDescription,
|
|
||||||
testFunction: testFunction,
|
|
||||||
parallel: false
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
|
|
||||||
testParallel (testDescription: string, testFunction: ITestFunction) {
|
|
||||||
this._tests.push(new TapTest({
|
|
||||||
description: testDescription,
|
|
||||||
testFunction: testFunction,
|
|
||||||
parallel: true
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* starts the test evaluation
|
|
||||||
*/
|
|
||||||
async start () {
|
|
||||||
let promiseArray: Promise<any>[] = []
|
|
||||||
|
|
||||||
// safeguard against empty test array
|
|
||||||
if (this._tests.length === 0) {
|
|
||||||
console.log('no tests specified. Ending here!')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(`1..${this._tests.length}`)
|
|
||||||
for (let testKey = 0; testKey < this._tests.length; testKey++) {
|
|
||||||
let currentTest = this._tests[testKey]
|
|
||||||
let testPromise = currentTest.run(testKey)
|
|
||||||
if (currentTest.parallel) {
|
|
||||||
promiseArray.push(testPromise)
|
|
||||||
} else {
|
|
||||||
await testPromise
|
|
||||||
}
|
|
||||||
}
|
|
||||||
await Promise.all(promiseArray)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* handle errors
|
|
||||||
*/
|
|
||||||
threw (err) {
|
|
||||||
console.log(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export let tap = new Tap()
|
|
||||||
|
|
7
ts/tapbundle.tapcreator.ts
Normal file
7
ts/tapbundle.tapcreator.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import * as plugins from './tapbundle.plugins'
|
||||||
|
|
||||||
|
export class TapCreator {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export let tapCreator = new TapCreator()
|
61
yarn.lock
61
yarn.lock
@ -23,6 +23,10 @@
|
|||||||
version "0.0.27"
|
version "0.0.27"
|
||||||
resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780"
|
resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780"
|
||||||
|
|
||||||
|
ansi-256-colors@^1.1.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz#910de50efcc7c09e3d82f2f87abd6b700c18818a"
|
||||||
|
|
||||||
assertion-error@^1.0.1:
|
assertion-error@^1.0.1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
|
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
|
||||||
@ -31,6 +35,17 @@ balanced-match@^0.4.1:
|
|||||||
version "0.4.2"
|
version "0.4.2"
|
||||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
|
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
|
||||||
|
|
||||||
|
beautycolor@^1.0.7:
|
||||||
|
version "1.0.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/beautycolor/-/beautycolor-1.0.7.tgz#a4715738ac4c8221371e9cbeb5a6cc6d11ecbf7c"
|
||||||
|
dependencies:
|
||||||
|
ansi-256-colors "^1.1.0"
|
||||||
|
typings-global "^1.0.14"
|
||||||
|
|
||||||
|
bindings@^1.2.1:
|
||||||
|
version "1.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11"
|
||||||
|
|
||||||
brace-expansion@^1.0.0:
|
brace-expansion@^1.0.0:
|
||||||
version "1.1.6"
|
version "1.1.6"
|
||||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9"
|
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9"
|
||||||
@ -70,6 +85,14 @@ deep-eql@^0.1.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
type-detect "0.1.1"
|
type-detect "0.1.1"
|
||||||
|
|
||||||
|
early@^2.1.1:
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/early/-/early-2.1.1.tgz#841e23254ea5dc54d8afaeee82f5ab65c00ee23c"
|
||||||
|
dependencies:
|
||||||
|
beautycolor "^1.0.7"
|
||||||
|
smartq "^1.1.1"
|
||||||
|
typings-global "^1.0.16"
|
||||||
|
|
||||||
fs.realpath@^1.0.0:
|
fs.realpath@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||||
@ -100,12 +123,40 @@ interpret@^1.0.0:
|
|||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c"
|
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c"
|
||||||
|
|
||||||
|
leakage@^0.2.0:
|
||||||
|
version "0.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.2.0.tgz#9e7a8cc1d241d8c8427e348769e192e172fd8733"
|
||||||
|
dependencies:
|
||||||
|
left-pad "^1.1.3"
|
||||||
|
memwatch-next "^0.3.0"
|
||||||
|
minimist "^1.2.0"
|
||||||
|
pretty-bytes "^4.0.2"
|
||||||
|
|
||||||
|
left-pad@^1.1.3:
|
||||||
|
version "1.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.1.3.tgz#612f61c033f3a9e08e939f1caebeea41b6f3199a"
|
||||||
|
|
||||||
|
memwatch-next@^0.3.0:
|
||||||
|
version "0.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/memwatch-next/-/memwatch-next-0.3.0.tgz#2111050f9a906e0aa2d72a4ec0f0089c78726f8f"
|
||||||
|
dependencies:
|
||||||
|
bindings "^1.2.1"
|
||||||
|
nan "^2.3.2"
|
||||||
|
|
||||||
minimatch@^3.0.2:
|
minimatch@^3.0.2:
|
||||||
version "3.0.3"
|
version "3.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
|
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
|
||||||
dependencies:
|
dependencies:
|
||||||
brace-expansion "^1.0.0"
|
brace-expansion "^1.0.0"
|
||||||
|
|
||||||
|
minimist@^1.2.0:
|
||||||
|
version "1.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
|
||||||
|
|
||||||
|
nan@^2.3.2:
|
||||||
|
version "2.6.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45"
|
||||||
|
|
||||||
once@^1.3.0:
|
once@^1.3.0:
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||||
@ -120,6 +171,10 @@ path-parse@^1.0.5:
|
|||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
|
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
|
||||||
|
|
||||||
|
pretty-bytes@^4.0.2:
|
||||||
|
version "4.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
|
||||||
|
|
||||||
rechoir@^0.6.2:
|
rechoir@^0.6.2:
|
||||||
version "0.6.2"
|
version "0.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
|
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
|
||||||
@ -155,6 +210,12 @@ smartchai@^1.0.3:
|
|||||||
chai-as-promised "^6.0.0"
|
chai-as-promised "^6.0.0"
|
||||||
chai-string "^1.3.0"
|
chai-string "^1.3.0"
|
||||||
|
|
||||||
|
smartdelay@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.1.tgz#687f8bcc09d7c62c9c5a8a1771c1aba3aff54156"
|
||||||
|
dependencies:
|
||||||
|
typings-global "^1.0.14"
|
||||||
|
|
||||||
smartq@^1.1.1:
|
smartq@^1.1.1:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.1.tgz#efb358705260d41ae18aef7ffd815f7b6fe17dd3"
|
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.1.tgz#efb358705260d41ae18aef7ffd815f7b6fe17dd3"
|
||||||
|
Reference in New Issue
Block a user