Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
f184077ab5 | |||
87fa936d5f | |||
df478b173c | |||
95befab964 | |||
f34b889358 | |||
2b21566fe1 | |||
d22fc1b688 | |||
15bbf7f10c | |||
c5e068d5cd | |||
95fa33df58 | |||
42933e6bb0 | |||
5010e882f6 | |||
055d36c74e | |||
e2ac035997 | |||
ec0d6004d5 | |||
3bbca9b0b4 | |||
f16e25b413 | |||
36574d0f34 | |||
12ac28ba44 | |||
1c80c25b14 | |||
03614fe2ef | |||
8be85e1b35 | |||
baf56089d7 | |||
42cd52a2f3 | |||
140f8a2499 | |||
952b6ec2a4 |
@ -7,60 +7,75 @@ cache:
|
|||||||
key: "$CI_BUILD_STAGE"
|
key: "$CI_BUILD_STAGE"
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- mirror
|
||||||
- test
|
- test
|
||||||
- release
|
- release
|
||||||
- trigger
|
- trigger
|
||||||
- pages
|
- pages
|
||||||
|
|
||||||
|
mirror:
|
||||||
|
stage: mirror
|
||||||
|
script:
|
||||||
|
- npmci git mirror
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
testLEGACY:
|
testLEGACY:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test legacy
|
- npmci node install legacy
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
testLTS:
|
testLTS:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test lts
|
- npmci node install lts
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
testSTABLE:
|
testSTABLE:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test stable
|
- npmci node install stable
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
release:
|
release:
|
||||||
stage: release
|
stage: release
|
||||||
script:
|
script:
|
||||||
- npmci publish
|
- npmci npm prepare
|
||||||
|
- npmci npm publish
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
stage: trigger
|
stage: trigger
|
||||||
script:
|
script:
|
||||||
- npmci trigger
|
- npmci trigger
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
image: hosttoday/ht-docker-node:npmci
|
image: hosttoday/ht-docker-node:npmci
|
||||||
stage: pages
|
stage: pages
|
||||||
script:
|
script:
|
||||||
- npmci command yarn global add npmpage
|
- npmci command yarn global add npmpage
|
||||||
- npmci command npmpage --publish gitlab
|
- npmci command npmpage
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
only:
|
only:
|
||||||
|
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)
|
||||||
|
5
dist/index.d.ts
vendored
5
dist/index.d.ts
vendored
@ -1,4 +1,3 @@
|
|||||||
import 'typings-global';
|
import 'typings-global';
|
||||||
import { expect } from 'smartchai';
|
export { expect } from 'smartchai';
|
||||||
import { tap } from './tapbundle.tap';
|
export { tap } from './tapbundle.classes.tap';
|
||||||
export { tap, expect };
|
|
||||||
|
8
dist/index.js
vendored
8
dist/index.js
vendored
@ -1,8 +1,8 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
require("typings-global");
|
require("typings-global");
|
||||||
const smartchai_1 = require("smartchai");
|
var smartchai_1 = require("smartchai");
|
||||||
exports.expect = smartchai_1.expect;
|
exports.expect = smartchai_1.expect;
|
||||||
const tapbundle_tap_1 = require("./tapbundle.tap");
|
var 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2Qix1Q0FBa0M7QUFBekIsNkJBQUEsTUFBTSxDQUFBO0FBQ2YsaUVBQTZDO0FBQXBDLHNDQUFBLEdBQUcsQ0FBQSJ9
|
@ -1,34 +1,23 @@
|
|||||||
export declare type TTestStatus = 'success' | 'error' | 'pending' | 'errorAfterSuccess';
|
import { TapTest, ITestFunction } from './tapbundle.classes.taptest';
|
||||||
export interface ITestFunction {
|
import { TapWrap, ITapWrapFunction } from './tapbundle.classes.tapwrap';
|
||||||
(): Promise<any>;
|
|
||||||
}
|
|
||||||
export declare class TapTest {
|
|
||||||
description: string;
|
|
||||||
testFunction: ITestFunction;
|
|
||||||
status: TTestStatus;
|
|
||||||
parallel: boolean;
|
|
||||||
returnValue: any;
|
|
||||||
/**
|
|
||||||
* constructor
|
|
||||||
*/
|
|
||||||
constructor(optionsArg: {
|
|
||||||
description: string;
|
|
||||||
testFunction: ITestFunction;
|
|
||||||
parallel: boolean;
|
|
||||||
});
|
|
||||||
/**
|
|
||||||
* run the test
|
|
||||||
*/
|
|
||||||
run(testKeyArg: number): Promise<void>;
|
|
||||||
}
|
|
||||||
export declare class Tap {
|
export declare class Tap {
|
||||||
|
/**
|
||||||
|
* skip a test
|
||||||
|
*/
|
||||||
|
skip: {
|
||||||
|
test: (descriptionArg: string, functionArg: ITestFunction) => void;
|
||||||
|
};
|
||||||
private _tests;
|
private _tests;
|
||||||
/**
|
/**
|
||||||
* Normal test function, will run one by one
|
* Normal test function, will run one by one
|
||||||
* @param testDescription - A description of what the test does
|
* @param testDescription - A description of what the test does
|
||||||
* @param testFunction - A Function that returns a Promise and resolves or rejects
|
* @param testFunction - A Function that returns a Promise and resolves or rejects
|
||||||
*/
|
*/
|
||||||
test(testDescription: string, testFunction: ITestFunction): Promise<void>;
|
test(testDescription: string, testFunction: ITestFunction): Promise<TapTest>;
|
||||||
|
/**
|
||||||
|
* wraps function
|
||||||
|
*/
|
||||||
|
wrap(functionArg: ITapWrapFunction): TapWrap;
|
||||||
/**
|
/**
|
||||||
* A parallel test that will not be waited for before the next starts.
|
* A parallel test that will not be waited for before the next starts.
|
||||||
* @param testDescription - A description of what the test does
|
* @param testDescription - A description of what the test does
|
100
dist/tapbundle.classes.tap.js
vendored
Normal file
100
dist/tapbundle.classes.tap.js
vendored
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
"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");
|
||||||
|
const tapbundle_classes_tapwrap_1 = require("./tapbundle.classes.tapwrap");
|
||||||
|
class Tap {
|
||||||
|
constructor() {
|
||||||
|
/**
|
||||||
|
* skip a test
|
||||||
|
*/
|
||||||
|
this.skip = {
|
||||||
|
test: (descriptionArg, functionArg) => {
|
||||||
|
console.log(`skipped test: ${descriptionArg}`);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
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;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* wraps function
|
||||||
|
*/
|
||||||
|
wrap(functionArg) {
|
||||||
|
return new tapbundle_classes_tapwrap_1.TapWrap(functionArg);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLmNsYXNzZXMudGFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvdGFwYnVuZGxlLmNsYXNzZXMudGFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFFQSwyRUFBb0U7QUFDcEUsMkVBQXVFO0FBQ3ZFO0lBQUE7UUFFRTs7V0FFRztRQUNILFNBQUksR0FBRztZQUNMLElBQUksRUFBRSxDQUFDLGNBQXNCLEVBQUUsV0FBMEIsRUFBRSxFQUFFO2dCQUMzRCxPQUFPLENBQUMsR0FBRyxDQUFDLGlCQUFpQixjQUFjLEVBQUUsQ0FBQyxDQUFBO1lBQ2hELENBQUM7U0FDRixDQUFBO1FBRU8sV0FBTSxHQUFjLEVBQUUsQ0FBQTtJQTZFaEMsQ0FBQztJQTNFQzs7OztPQUlHO0lBQ0csSUFBSSxDQUFFLGVBQXVCLEVBQUUsWUFBMkI7O1lBQzlELElBQUksU0FBUyxHQUFHLElBQUksbUNBQU8sQ0FBQztnQkFDMUIsV0FBVyxFQUFFLGVBQWU7Z0JBQzVCLFlBQVksRUFBRSxZQUFZO2dCQUMxQixRQUFRLEVBQUUsS0FBSzthQUNoQixDQUFDLENBQUE7WUFDRixJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQTtZQUMzQixNQUFNLENBQUMsU0FBUyxDQU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BRSxPQUFPLENBQUUsQ0FBQTtnQkFDeEMsSUFBSSxXQUFXLEdBQUcsV0FBVyxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQTtnQkFDMUMsRUFBRSxDQUFDLENBQUMsV0FBVyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUM7b0JBQ3pCLFlBQVksQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLENBQUE7Z0JBQ2hDLENBQUM7Z0JBQUMsSUFBSSxDQUFDLENBQUM7b0JBQ04sTUFBTSxXQUFXLENBQUE7Z0JBQ25CLENBQUM7WUFDSCxDQUFDO1lBQ0QsTUFBTSxPQUFPLENBQUMsR0FBRyxDQUFDLFlBQVksQ0FBQyxDQUFBO1FBQ2pDLENBQUM7S0FBQTtJQUVEOztPQUVHO0lBQ0gsS0FBSyxDQUFFLEdBQUc7UUFDUixPQUFPLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxDQUFBO0lBQ2xCLENBQUM7Q0FDRjtBQXhGRCxrQkF3RkM7QUFFVSxRQUFBLEdBQUcsR0FBRyxJQUFJLEdBQUcsRUFBRSxDQUFBIn0=
|
30
dist/tapbundle.classes.taptest.d.ts
vendored
Normal file
30
dist/tapbundle.classes.taptest.d.ts
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
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 {
|
||||||
|
(tapTools?: TapTools): Promise<any>;
|
||||||
|
}
|
||||||
|
export declare class TapTest {
|
||||||
|
description: string;
|
||||||
|
failureAllowed: boolean;
|
||||||
|
hrtMeasurement: HrtMeasurement;
|
||||||
|
parallel: boolean;
|
||||||
|
status: TTestStatus;
|
||||||
|
tapTools: TapTools;
|
||||||
|
testFunction: ITestFunction;
|
||||||
|
testDeferred: Deferred<TapTest>;
|
||||||
|
testPromise: Promise<TapTest>;
|
||||||
|
/**
|
||||||
|
* constructor
|
||||||
|
*/
|
||||||
|
constructor(optionsArg: {
|
||||||
|
description: string;
|
||||||
|
testFunction: ITestFunction;
|
||||||
|
parallel: boolean;
|
||||||
|
});
|
||||||
|
/**
|
||||||
|
* run the test
|
||||||
|
*/
|
||||||
|
run(testKeyArg: number): Promise<void>;
|
||||||
|
}
|
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.resolve(this);
|
||||||
|
// 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLmNsYXNzZXMudGFwdGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3RhcGJ1bmRsZS5jbGFzc2VzLnRhcHRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLCtDQUE4QztBQUU5Qyw2RUFBdUQ7QUFFdkQsc0JBQXN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URELDBCQTBEQyJ9
|
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>;
|
||||||
|
}
|
42
dist/tapbundle.classes.taptools.js
vendored
Normal file
42
dist/tapbundle.classes.taptools.js
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
"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* () {
|
||||||
|
let timeout = new plugins.smartdelay.Timeout(timeMilliArg);
|
||||||
|
timeout.makeUnrefed();
|
||||||
|
yield timeout.promise;
|
||||||
|
if (this._tapTest.status === 'pending') {
|
||||||
|
this._tapTest.status = 'timeout';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.TapTools = TapTools;
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLmNsYXNzZXMudGFwdG9vbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy90YXBidW5kbGUuY2xhc3Nlcy50YXB0b29scy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEsK0NBQThDO0FBRzlDO0lBT0UsWUFBYSxVQUFVO1FBQ3JCLElBQUksQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFBO0lBQzVCLENBQUM7SUFFRDs7T0FFRztJQUNILFlBQVk7UUFDVixJQUFJLENBQUMsUUFBUSxDQUFDLGNBQWMsR0FBRyxJQUFJLENBQUE7SUFDckMsQ0FBQztJQUVEOztPQUVHO0lBQ0csUUFBUSxDQUFFLFlBQVk7O1lBQzFCLE1BQU0sT0FBTyxDQUFDLFVBQVUsQ0FBQyxRQUFRLENBQUMsWUFBWSxDQUFDLENBQUE7UUFDakQsQ0FBQztLQUFBO0lBRUssT0FBTyxDQUFFLFlBQW9COztZQUNqQyxJQUFJLE9BQU8sR0FBRyxJQUFJLE9BQU8sQ0FBQyxVQUFVLENBQUMsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQUFBO1lBQzFELE9BQU8sQ0FBQyxXQUFXLEVBQUUsQ0FBQTtZQUNyQixNQUFNLE9BQU8sQ0FBQyxPQUFPLENBQUE7WUFDckIsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxNQUFNLEtBQUssU0FBUyxDQUFDLENBQUMsQ0FBQztnQkFDdkMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxNQUFNLEdBQUcsU0FBUyxDQUFBO1lBQ2xDLENBQUM7UUFDSCxDQUFDO0tBQUE7Q0FFRjtBQWxDRCw0QkFrQ0MifQ==
|
14
dist/tapbundle.classes.tapwrap.d.ts
vendored
Normal file
14
dist/tapbundle.classes.tapwrap.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
export interface ITapWrapFunction {
|
||||||
|
(): Promise<any>;
|
||||||
|
}
|
||||||
|
export declare class TapWrap {
|
||||||
|
wrapFunction: ITapWrapFunction;
|
||||||
|
/**
|
||||||
|
* the constructor
|
||||||
|
*/
|
||||||
|
constructor(wrapFunctionArg: ITapWrapFunction);
|
||||||
|
/**
|
||||||
|
* run the wrapFunction
|
||||||
|
*/
|
||||||
|
run(): Promise<void>;
|
||||||
|
}
|
29
dist/tapbundle.classes.tapwrap.js
vendored
Normal file
29
dist/tapbundle.classes.tapwrap.js
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
"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 TapWrap {
|
||||||
|
/**
|
||||||
|
* the constructor
|
||||||
|
*/
|
||||||
|
constructor(wrapFunctionArg) {
|
||||||
|
// nothing here
|
||||||
|
this.wrapFunction = wrapFunctionArg;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* run the wrapFunction
|
||||||
|
*/
|
||||||
|
run() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
yield this.wrapFunction();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.TapWrap = TapWrap;
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLmNsYXNzZXMudGFwd3JhcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3RhcGJ1bmRsZS5jbGFzc2VzLnRhcHdyYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQU1BO0lBR0U7O09BRUc7SUFDSCxZQUFhLGVBQWlDO1FBQzVDLGVBQWU7UUFDZixJQUFJLENBQUMsWUFBWSxHQUFHLGVBQWUsQ0FBQTtJQUNyQyxDQUFDO0lBRUQ7O09BRUc7SUFDRyxHQUFHOztZQUNQLE1BQU0sSUFBSSxDQUFDLFlBQVksRUFBRSxDQUFBO1FBQzNCLENBQUM7S0FBQTtDQUNGO0FBakJELDBCQWlCQyJ9
|
6
dist/tapbundle.plugins.d.ts
vendored
6
dist/tapbundle.plugins.d.ts
vendored
@ -1,4 +1,6 @@
|
|||||||
import 'typings-global';
|
import 'typings-global';
|
||||||
import * as smartq from 'smartq';
|
import * as early from 'early';
|
||||||
import * as leakage from 'leakage';
|
import * as leakage from 'leakage';
|
||||||
export { smartq, leakage };
|
import * as smartdelay from 'smartdelay';
|
||||||
|
import * as smartq from 'smartq';
|
||||||
|
export { early, smartdelay, smartq, leakage };
|
||||||
|
10
dist/tapbundle.plugins.js
vendored
10
dist/tapbundle.plugins.js
vendored
@ -1,8 +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 smartq = require("smartq");
|
const early = require("early");
|
||||||
exports.smartq = smartq;
|
exports.early = early;
|
||||||
const leakage = require("leakage");
|
const leakage = require("leakage");
|
||||||
exports.leakage = leakage;
|
exports.leakage = leakage;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy90YXBidW5kbGUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2QixpQ0FBZ0M7QUFJOUIsd0JBQU07QUFIUixtQ0FBa0M7QUFJaEMsMEJBQU8ifQ==
|
const smartdelay = require("smartdelay");
|
||||||
|
exports.smartdelay = smartdelay;
|
||||||
|
const smartq = require("smartq");
|
||||||
|
exports.smartq = smartq;
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy90YXBidW5kbGUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2QiwrQkFBOEI7QUFNNUIsc0JBQUs7QUFMUCxtQ0FBa0M7QUFRaEMsMEJBQU87QUFQVCx5Q0FBd0M7QUFLdEMsZ0NBQVU7QUFKWixpQ0FBZ0M7QUFLOUIsd0JBQU0ifQ==
|
114
dist/tapbundle.tap.js
vendored
114
dist/tapbundle.tap.js
vendored
@ -1,114 +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} # time=20.040ms`);
|
|
||||||
this.status = 'success';
|
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
console.log(`not ok ${testKeyArg + 1} - ${this.description} # time=20.040ms`);
|
|
||||||
if (this.status === 'success') {
|
|
||||||
this.status = 'errorAfterSuccess';
|
|
||||||
console.log('!!! ALERT !!!: weird behaviour, since test has been already successfull');
|
|
||||||
}
|
|
||||||
console.log(err);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exports.TapTest = TapTest;
|
|
||||||
class Tap {
|
|
||||||
constructor() {
|
|
||||||
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* () {
|
|
||||||
this._tests.push(new TapTest({
|
|
||||||
description: testDescription,
|
|
||||||
testFunction: testFunction,
|
|
||||||
parallel: false
|
|
||||||
}));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 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 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);
|
|
||||||
}
|
|
||||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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 package @types/chai (through smartchai)
|
||||||
|
* 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.eventually.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,7 +1,12 @@
|
|||||||
{
|
{
|
||||||
"npmci": {
|
"npmci": {
|
||||||
"globalNpmTools": [
|
"npmGlobalTools": [
|
||||||
"npmts"
|
"npmts"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"npmts": {
|
||||||
|
"testConfig": {
|
||||||
|
"parallel": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
422
package-lock.json
generated
Normal file
422
package-lock.json
generated
Normal file
@ -0,0 +1,422 @@
|
|||||||
|
{
|
||||||
|
"name": "tapbundle",
|
||||||
|
"version": "1.1.3",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": {
|
||||||
|
"version": "8.0.33",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.33.tgz",
|
||||||
|
"integrity": "sha512-vmCdO8Bm1ExT+FWfC9sd9r4jwqM7o97gGy2WBshkkXbf/2nLAJQUrZfIhw27yVOtLUev6kSZc4cav/46KbDd8A=="
|
||||||
|
},
|
||||||
|
"early": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/early/-/early-2.1.1.tgz",
|
||||||
|
"integrity": "sha1-hB4jJU6l3FTYr67ugvWrZcAO4jw=",
|
||||||
|
"requires": {
|
||||||
|
"beautycolor": "1.0.7",
|
||||||
|
"smartq": "1.1.1",
|
||||||
|
"typings-global": "1.0.19"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"beautycolor": {
|
||||||
|
"version": "1.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/beautycolor/-/beautycolor-1.0.7.tgz",
|
||||||
|
"integrity": "sha1-pHFXOKxMgiE3Hpy+tabMbRHsv3w=",
|
||||||
|
"requires": {
|
||||||
|
"ansi-256-colors": "1.1.0",
|
||||||
|
"typings-global": "1.0.19"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-256-colors": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-kQ3lDvzHwJ49gvL4er1rcAwYgYo="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"leakage": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/leakage/-/leakage-0.3.0.tgz",
|
||||||
|
"integrity": "sha1-FdaYq9x2u8ZDlgH08wIOd+LVDDk=",
|
||||||
|
"requires": {
|
||||||
|
"es6-error": "4.0.2",
|
||||||
|
"left-pad": "1.1.3",
|
||||||
|
"memwatch-next": "0.3.0",
|
||||||
|
"minimist": "1.2.0",
|
||||||
|
"pretty-bytes": "4.0.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"es6-error": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.0.2.tgz",
|
||||||
|
"integrity": "sha1-7sXHJurO9Rt/a3PCDbbhsTsGnJg="
|
||||||
|
},
|
||||||
|
"left-pad": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.1.3.tgz",
|
||||||
|
"integrity": "sha1-YS9hwDPzqeCOk58crr7qQbbzGZo="
|
||||||
|
},
|
||||||
|
"memwatch-next": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/memwatch-next/-/memwatch-next-0.3.0.tgz",
|
||||||
|
"integrity": "sha1-IREFD5qQbgqi1ypOwPAInHhyb48=",
|
||||||
|
"requires": {
|
||||||
|
"bindings": "1.2.1",
|
||||||
|
"nan": "2.6.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"bindings": {
|
||||||
|
"version": "1.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz",
|
||||||
|
"integrity": "sha1-FK1hE4EtLTfXLme0ystLtyZQXxE="
|
||||||
|
},
|
||||||
|
"nan": {
|
||||||
|
"version": "2.6.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz",
|
||||||
|
"integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minimist": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||||
|
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
|
||||||
|
},
|
||||||
|
"pretty-bytes": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz",
|
||||||
|
"integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"smartchai": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/smartchai/-/smartchai-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-3m0BC7i1rvJMtwsxpfUzToxBty8=",
|
||||||
|
"requires": {
|
||||||
|
"@types/chai": "3.5.2",
|
||||||
|
"@types/chai-as-promised": "0.0.29",
|
||||||
|
"@types/chai-string": "1.1.30",
|
||||||
|
"chai": "3.5.0",
|
||||||
|
"chai-as-promised": "6.0.0",
|
||||||
|
"chai-string": "1.4.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/chai": {
|
||||||
|
"version": "3.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/chai/-/chai-3.5.2.tgz",
|
||||||
|
"integrity": "sha1-wRzSgX06QBt7oPWkIPNcVhObHB4="
|
||||||
|
},
|
||||||
|
"@types/chai-as-promised": {
|
||||||
|
"version": "0.0.29",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-0.0.29.tgz",
|
||||||
|
"integrity": "sha1-Q9UokqqZjhhaPePiR37bhXO+HXc=",
|
||||||
|
"requires": {
|
||||||
|
"@types/chai": "3.5.2",
|
||||||
|
"@types/promises-a-plus": "0.0.27"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/promises-a-plus": {
|
||||||
|
"version": "0.0.27",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz",
|
||||||
|
"integrity": "sha1-xkZRE0YUyEuPXXEUzokB02pgl4A="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/chai-string": {
|
||||||
|
"version": "1.1.30",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/chai-string/-/chai-string-1.1.30.tgz",
|
||||||
|
"integrity": "sha1-TYdEsxpaIpX8AcmB7R4tTIoHDwo=",
|
||||||
|
"requires": {
|
||||||
|
"@types/chai": "3.5.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"chai": {
|
||||||
|
"version": "3.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz",
|
||||||
|
"integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=",
|
||||||
|
"requires": {
|
||||||
|
"assertion-error": "1.0.2",
|
||||||
|
"deep-eql": "0.1.3",
|
||||||
|
"type-detect": "1.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"assertion-error": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-E8pRXYYgbaC6xm6DTdOX2HWBCUw="
|
||||||
|
},
|
||||||
|
"deep-eql": {
|
||||||
|
"version": "0.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz",
|
||||||
|
"integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=",
|
||||||
|
"requires": {
|
||||||
|
"type-detect": "0.1.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"type-detect": {
|
||||||
|
"version": "0.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz",
|
||||||
|
"integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type-detect": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"chai-as-promised": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-6.0.0.tgz",
|
||||||
|
"integrity": "sha1-GgKkM6byTa+sY7nJb6FoTbGqjaY=",
|
||||||
|
"requires": {
|
||||||
|
"check-error": "1.0.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"check-error": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"chai-string": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/chai-string/-/chai-string-1.4.0.tgz",
|
||||||
|
"integrity": "sha1-NZFAwFHTak5LGl/GuRAVL0OKjUk="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"smartdelay": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/smartdelay/-/smartdelay-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-X9RNrXcmLREHAvApPvqAwHLPtXk=",
|
||||||
|
"requires": {
|
||||||
|
"smartq": "1.1.1",
|
||||||
|
"typings-global": "1.0.19"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"smartq": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/smartq/-/smartq-1.1.1.tgz",
|
||||||
|
"integrity": "sha1-77NYcFJg1Brhiu9//YFfe2/hfdM=",
|
||||||
|
"requires": {
|
||||||
|
"typed-promisify": "0.3.0",
|
||||||
|
"typings-global": "1.0.19"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"typed-promisify": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/typed-promisify/-/typed-promisify-0.3.0.tgz",
|
||||||
|
"integrity": "sha1-G6CvXkRMh9gEdAbxjOSQkqEZGFM="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"typings-global": {
|
||||||
|
"version": "1.0.19",
|
||||||
|
"resolved": "https://registry.npmjs.org/typings-global/-/typings-global-1.0.19.tgz",
|
||||||
|
"integrity": "sha1-M3anLU3h5VQb9XAiSP9kw+bqMWw=",
|
||||||
|
"requires": {
|
||||||
|
"semver": "5.3.0",
|
||||||
|
"smartshell": "1.0.8"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"semver": {
|
||||||
|
"version": "5.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
|
||||||
|
"integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8="
|
||||||
|
},
|
||||||
|
"smartshell": {
|
||||||
|
"version": "1.0.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/smartshell/-/smartshell-1.0.8.tgz",
|
||||||
|
"integrity": "sha1-FTV1bA/oBp9+baHj+ctsj3cJTkI=",
|
||||||
|
"requires": {
|
||||||
|
"@types/shelljs": "0.7.2",
|
||||||
|
"@types/which": "1.0.28",
|
||||||
|
"shelljs": "0.7.8",
|
||||||
|
"smartq": "1.1.1",
|
||||||
|
"typings-global": "1.0.19",
|
||||||
|
"which": "1.2.14"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/shelljs": {
|
||||||
|
"version": "0.7.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.7.2.tgz",
|
||||||
|
"integrity": "sha1-wr2z/oDNej2gh1DKiYrkTFiWcfM=",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "8.0.7"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": {
|
||||||
|
"version": "8.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.7.tgz",
|
||||||
|
"integrity": "sha1-+wrQS1tvbqvgNyoyqPH7ulwTDK4="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/which": {
|
||||||
|
"version": "1.0.28",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/which/-/which-1.0.28.tgz",
|
||||||
|
"integrity": "sha1-AW44dim4gXvtZT/jLqtdESecjfY="
|
||||||
|
},
|
||||||
|
"shelljs": {
|
||||||
|
"version": "0.7.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz",
|
||||||
|
"integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=",
|
||||||
|
"requires": {
|
||||||
|
"glob": "7.1.2",
|
||||||
|
"interpret": "1.0.3",
|
||||||
|
"rechoir": "0.6.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"glob": {
|
||||||
|
"version": "7.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
|
||||||
|
"integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=",
|
||||||
|
"requires": {
|
||||||
|
"fs.realpath": "1.0.0",
|
||||||
|
"inflight": "1.0.6",
|
||||||
|
"inherits": "2.0.3",
|
||||||
|
"minimatch": "3.0.4",
|
||||||
|
"once": "1.4.0",
|
||||||
|
"path-is-absolute": "1.0.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"fs.realpath": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
|
||||||
|
},
|
||||||
|
"inflight": {
|
||||||
|
"version": "1.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||||
|
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||||
|
"requires": {
|
||||||
|
"once": "1.4.0",
|
||||||
|
"wrappy": "1.0.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"wrappy": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"inherits": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||||
|
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
|
||||||
|
},
|
||||||
|
"minimatch": {
|
||||||
|
"version": "3.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||||
|
"integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
|
||||||
|
"requires": {
|
||||||
|
"brace-expansion": "1.1.8"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"brace-expansion": {
|
||||||
|
"version": "1.1.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
|
||||||
|
"integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
|
||||||
|
"requires": {
|
||||||
|
"balanced-match": "1.0.0",
|
||||||
|
"concat-map": "0.0.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"balanced-match": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
||||||
|
},
|
||||||
|
"concat-map": {
|
||||||
|
"version": "0.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||||
|
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"once": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||||
|
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||||
|
"requires": {
|
||||||
|
"wrappy": "1.0.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"wrappy": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"path-is-absolute": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"interpret": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-y8NcYu7uc/Gat7EKgBURQBr8D5A="
|
||||||
|
},
|
||||||
|
"rechoir": {
|
||||||
|
"version": "0.6.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
|
||||||
|
"integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
|
||||||
|
"requires": {
|
||||||
|
"resolve": "1.3.3"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"resolve": {
|
||||||
|
"version": "1.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz",
|
||||||
|
"integrity": "sha1-ZVkHw0aahoDcLeOidaj91paR8OU=",
|
||||||
|
"requires": {
|
||||||
|
"path-parse": "1.0.5"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"path-parse": {
|
||||||
|
"version": "1.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
|
||||||
|
"integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"which": {
|
||||||
|
"version": "1.2.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz",
|
||||||
|
"integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=",
|
||||||
|
"requires": {
|
||||||
|
"isexe": "2.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"isexe": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
11
package.json
11
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tapbundle",
|
"name": "tapbundle",
|
||||||
"version": "1.0.7",
|
"version": "1.1.3",
|
||||||
"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,9 +18,12 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/pushrocks/tapbundle#README",
|
"homepage": "https://gitlab.com/pushrocks/tapbundle#README",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"leakage": "^0.2.0",
|
"@types/node": "^8.0.33",
|
||||||
|
"early": "^2.1.1",
|
||||||
|
"leakage": "^0.3.0",
|
||||||
"smartchai": "^1.0.3",
|
"smartchai": "^1.0.3",
|
||||||
"smartq": "^1.1.1",
|
"smartdelay": "^1.0.4",
|
||||||
"typings-global": "^1.0.16"
|
"smartq": "^1.1.6",
|
||||||
|
"typings-global": "^1.0.20"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
10
test/test.tapwrap.ts
Normal file
10
test/test.tapwrap.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { tap, expect } from '../ts/index'
|
||||||
|
|
||||||
|
let tapwrap = tap.wrap(async () => {
|
||||||
|
tap.test('should do something', async () => {
|
||||||
|
console.log('test1')
|
||||||
|
})
|
||||||
|
tap.start()
|
||||||
|
})
|
||||||
|
|
||||||
|
tapwrap.run()
|
29
test/test.ts
29
test/test.ts
@ -1,7 +1,32 @@
|
|||||||
import { tap, expect } from '../dist/index'
|
import { tap, expect } from '../ts/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()
|
||||||
|
10
ts/index.ts
10
ts/index.ts
@ -1,9 +1,3 @@
|
|||||||
import 'typings-global'
|
import 'typings-global'
|
||||||
import { expect } from 'smartchai'
|
export { expect } from 'smartchai'
|
||||||
import { tap } from './tapbundle.tap'
|
export { tap } from './tapbundle.classes.tap'
|
||||||
|
|
||||||
|
|
||||||
export {
|
|
||||||
tap,
|
|
||||||
expect
|
|
||||||
}
|
|
||||||
|
@ -1,56 +1,18 @@
|
|||||||
import * as plugins from './tapbundle.plugins'
|
import * as plugins from './tapbundle.plugins'
|
||||||
|
|
||||||
import { tapCreator } from './tapbundle.tapcreator'
|
import { TapTest, ITestFunction } from './tapbundle.classes.taptest'
|
||||||
|
import { TapWrap, ITapWrapFunction } from './tapbundle.classes.tapwrap'
|
||||||
// interfaces
|
export class Tap {
|
||||||
export type TTestStatus = 'success' | 'error' | 'pending' | 'errorAfterSuccess'
|
|
||||||
|
|
||||||
export interface ITestFunction {
|
|
||||||
(): Promise<any>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export class TapTest {
|
|
||||||
description: string
|
|
||||||
testFunction: ITestFunction
|
|
||||||
status: TTestStatus
|
|
||||||
parallel: boolean
|
|
||||||
returnValue
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* constructor
|
* skip a test
|
||||||
*/
|
*/
|
||||||
constructor (optionsArg: {
|
skip = {
|
||||||
description: string,
|
test: (descriptionArg: string, functionArg: ITestFunction) => {
|
||||||
testFunction: ITestFunction,
|
console.log(`skipped test: ${descriptionArg}`)
|
||||||
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} # time=20.040ms`)
|
|
||||||
this.status = 'success'
|
|
||||||
} catch (err) {
|
|
||||||
console.log(`not ok ${testKeyArg + 1} - ${this.description} # time=20.040ms`)
|
|
||||||
if (this.status === 'success') {
|
|
||||||
this.status = 'errorAfterSuccess'
|
|
||||||
console.log('!!! ALERT !!!: weird behaviour, since test has been already successfull')
|
|
||||||
}
|
|
||||||
console.log(err)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
export class Tap {
|
|
||||||
private _tests: TapTest[] = []
|
private _tests: TapTest[] = []
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,11 +21,20 @@ export class Tap {
|
|||||||
* @param testFunction - A Function that returns a Promise and resolves or rejects
|
* @param testFunction - A Function that returns a Promise and resolves or rejects
|
||||||
*/
|
*/
|
||||||
async test (testDescription: string, testFunction: ITestFunction) {
|
async test (testDescription: string, testFunction: ITestFunction) {
|
||||||
this._tests.push(new TapTest({
|
let localTest = new TapTest({
|
||||||
description: testDescription,
|
description: testDescription,
|
||||||
testFunction: testFunction,
|
testFunction: testFunction,
|
||||||
parallel: false
|
parallel: false
|
||||||
}))
|
})
|
||||||
|
this._tests.push(localTest)
|
||||||
|
return localTest
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wraps function
|
||||||
|
*/
|
||||||
|
wrap (functionArg: ITapWrapFunction) {
|
||||||
|
return new TapWrap(functionArg)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -102,7 +73,7 @@ export class Tap {
|
|||||||
|
|
||||||
console.log(`1..${this._tests.length}`)
|
console.log(`1..${this._tests.length}`)
|
||||||
for (let testKey = 0; testKey < this._tests.length; testKey++) {
|
for (let testKey = 0; testKey < this._tests.length; testKey++) {
|
||||||
let currentTest = this._tests[testKey]
|
let currentTest = this._tests[ testKey ]
|
||||||
let testPromise = currentTest.run(testKey)
|
let testPromise = currentTest.run(testKey)
|
||||||
if (currentTest.parallel) {
|
if (currentTest.parallel) {
|
||||||
promiseArray.push(testPromise)
|
promiseArray.push(testPromise)
|
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.resolve(this)
|
||||||
|
|
||||||
|
// 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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
38
ts/tapbundle.classes.taptools.ts
Normal file
38
ts/tapbundle.classes.taptools.ts
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
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) {
|
||||||
|
let timeout = new plugins.smartdelay.Timeout(timeMilliArg)
|
||||||
|
timeout.makeUnrefed()
|
||||||
|
await timeout.promise
|
||||||
|
if (this._tapTest.status === 'pending') {
|
||||||
|
this._tapTest.status = 'timeout'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
24
ts/tapbundle.classes.tapwrap.ts
Normal file
24
ts/tapbundle.classes.tapwrap.ts
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import * as plugins from './tapbundle.plugins'
|
||||||
|
|
||||||
|
export interface ITapWrapFunction {
|
||||||
|
(): Promise<any>
|
||||||
|
}
|
||||||
|
|
||||||
|
export class TapWrap {
|
||||||
|
wrapFunction: ITapWrapFunction
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the constructor
|
||||||
|
*/
|
||||||
|
constructor (wrapFunctionArg: ITapWrapFunction) {
|
||||||
|
// nothing here
|
||||||
|
this.wrapFunction = wrapFunctionArg
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* run the wrapFunction
|
||||||
|
*/
|
||||||
|
async run () {
|
||||||
|
await this.wrapFunction()
|
||||||
|
}
|
||||||
|
}
|
@ -1,8 +1,12 @@
|
|||||||
import 'typings-global'
|
import 'typings-global'
|
||||||
import * as smartq from 'smartq'
|
import * as early from 'early'
|
||||||
import * as leakage from 'leakage'
|
import * as leakage from 'leakage'
|
||||||
|
import * as smartdelay from 'smartdelay'
|
||||||
|
import * as smartq from 'smartq'
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
early,
|
||||||
|
smartdelay,
|
||||||
smartq,
|
smartq,
|
||||||
leakage
|
leakage
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import * as plugins from './tapbundle.plugins'
|
import * as plugins from './tapbundle.plugins'
|
||||||
|
|
||||||
export class TapCreator {
|
export class TapCreator {
|
||||||
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
export let tapCreator = new TapCreator()
|
export let tapCreator = new TapCreator()
|
229
yarn.lock
229
yarn.lock
@ -15,31 +15,64 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/chai" "*"
|
"@types/chai" "*"
|
||||||
|
|
||||||
"@types/chai@*", "@types/chai@^3.4.35":
|
"@types/chai@*":
|
||||||
version "3.4.35"
|
version "4.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.4.35.tgz#e8d65f83492d2944f816fc620741821c28a8c900"
|
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.0.1.tgz#37fea779617cfec3fd2b19a0247e8bbdd5133bf6"
|
||||||
|
|
||||||
|
"@types/chai@^3.4.35":
|
||||||
|
version "3.5.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.5.2.tgz#c11cd2817d3a401b7ba0f5a420f35c56139b1c1e"
|
||||||
|
|
||||||
|
"@types/node@*":
|
||||||
|
version "8.0.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.7.tgz#fb0ad04b5b6f6eabe0372a32a8f1fbba5c130cae"
|
||||||
|
|
||||||
|
"@types/node@^8.0.33":
|
||||||
|
version "8.0.33"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.33.tgz#1126e94374014e54478092830704f6ea89df04cd"
|
||||||
|
|
||||||
"@types/promises-a-plus@*":
|
"@types/promises-a-plus@*":
|
||||||
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"
|
||||||
|
|
||||||
|
"@types/shelljs@^0.7.2":
|
||||||
|
version "0.7.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.7.2.tgz#c2bdb3fe80cd7a3da08750ca898ae44c589671f3"
|
||||||
|
dependencies:
|
||||||
|
"@types/node" "*"
|
||||||
|
|
||||||
|
"@types/which@^1.0.28":
|
||||||
|
version "1.0.28"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/which/-/which-1.0.28.tgz#016e387629b8817bed653fe32eab5d11279c8df6"
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
balanced-match@^0.4.1:
|
balanced-match@^1.0.0:
|
||||||
version "0.4.2"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
|
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
||||||
|
|
||||||
|
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:
|
bindings@^1.2.1:
|
||||||
version "1.2.1"
|
version "1.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11"
|
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11"
|
||||||
|
|
||||||
brace-expansion@^1.0.0:
|
brace-expansion@^1.1.7:
|
||||||
version "1.1.6"
|
version "1.1.8"
|
||||||
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.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
|
||||||
dependencies:
|
dependencies:
|
||||||
balanced-match "^0.4.1"
|
balanced-match "^1.0.0"
|
||||||
concat-map "0.0.1"
|
concat-map "0.0.1"
|
||||||
|
|
||||||
chai-as-promised@^6.0.0:
|
chai-as-promised@^6.0.0:
|
||||||
@ -49,8 +82,8 @@ chai-as-promised@^6.0.0:
|
|||||||
check-error "^1.0.2"
|
check-error "^1.0.2"
|
||||||
|
|
||||||
chai-string@^1.3.0:
|
chai-string@^1.3.0:
|
||||||
version "1.3.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.3.0.tgz#df6139f294391b1035be5606f60a843b3a5041e7"
|
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.4.0.tgz#359140c051d36a4e4b1a5fc6b910152f438a8d49"
|
||||||
|
|
||||||
chai@^3.5.0:
|
chai@^3.5.0:
|
||||||
version "3.5.0"
|
version "3.5.0"
|
||||||
@ -74,21 +107,72 @@ deep-eql@^0.1.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
type-detect "0.1.1"
|
type-detect "0.1.1"
|
||||||
|
|
||||||
|
define-properties@^1.1.2:
|
||||||
|
version "1.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94"
|
||||||
|
dependencies:
|
||||||
|
foreach "^2.0.5"
|
||||||
|
object-keys "^1.0.8"
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
|
es-abstract@^1.5.1:
|
||||||
|
version "1.9.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.9.0.tgz#690829a07cae36b222e7fd9b75c0d0573eb25227"
|
||||||
|
dependencies:
|
||||||
|
es-to-primitive "^1.1.1"
|
||||||
|
function-bind "^1.1.1"
|
||||||
|
has "^1.0.1"
|
||||||
|
is-callable "^1.1.3"
|
||||||
|
is-regex "^1.0.4"
|
||||||
|
|
||||||
|
es-to-primitive@^1.1.1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d"
|
||||||
|
dependencies:
|
||||||
|
is-callable "^1.1.1"
|
||||||
|
is-date-object "^1.0.1"
|
||||||
|
is-symbol "^1.0.1"
|
||||||
|
|
||||||
|
es6-error@^4.0.2:
|
||||||
|
version "4.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.0.2.tgz#eec5c726eacef51b7f6b73c20db6e1b13b069c98"
|
||||||
|
|
||||||
|
foreach@^2.0.5:
|
||||||
|
version "2.0.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
|
||||||
|
|
||||||
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"
|
||||||
|
|
||||||
|
function-bind@^1.0.2, function-bind@^1.1.1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
||||||
|
|
||||||
glob@^7.0.0:
|
glob@^7.0.0:
|
||||||
version "7.1.1"
|
version "7.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
|
||||||
dependencies:
|
dependencies:
|
||||||
fs.realpath "^1.0.0"
|
fs.realpath "^1.0.0"
|
||||||
inflight "^1.0.4"
|
inflight "^1.0.4"
|
||||||
inherits "2"
|
inherits "2"
|
||||||
minimatch "^3.0.2"
|
minimatch "^3.0.4"
|
||||||
once "^1.3.0"
|
once "^1.3.0"
|
||||||
path-is-absolute "^1.0.0"
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
|
has@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28"
|
||||||
|
dependencies:
|
||||||
|
function-bind "^1.0.2"
|
||||||
|
|
||||||
inflight@^1.0.4:
|
inflight@^1.0.4:
|
||||||
version "1.0.6"
|
version "1.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||||
@ -101,13 +185,36 @@ inherits@2:
|
|||||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
||||||
|
|
||||||
interpret@^1.0.0:
|
interpret@^1.0.0:
|
||||||
version "1.0.1"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c"
|
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90"
|
||||||
|
|
||||||
leakage@^0.2.0:
|
is-callable@^1.1.1, is-callable@^1.1.3:
|
||||||
version "0.2.0"
|
version "1.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.2.0.tgz#9e7a8cc1d241d8c8427e348769e192e172fd8733"
|
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
|
||||||
|
|
||||||
|
is-date-object@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
|
||||||
|
|
||||||
|
is-regex@^1.0.4:
|
||||||
|
version "1.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
has "^1.0.1"
|
||||||
|
|
||||||
|
is-symbol@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572"
|
||||||
|
|
||||||
|
isexe@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||||
|
|
||||||
|
leakage@^0.3.0:
|
||||||
|
version "0.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.3.0.tgz#15d698abdc76bbc6439601f4f3020e77e2d50c39"
|
||||||
|
dependencies:
|
||||||
|
es6-error "^4.0.2"
|
||||||
left-pad "^1.1.3"
|
left-pad "^1.1.3"
|
||||||
memwatch-next "^0.3.0"
|
memwatch-next "^0.3.0"
|
||||||
minimist "^1.2.0"
|
minimist "^1.2.0"
|
||||||
@ -124,11 +231,11 @@ memwatch-next@^0.3.0:
|
|||||||
bindings "^1.2.1"
|
bindings "^1.2.1"
|
||||||
nan "^2.3.2"
|
nan "^2.3.2"
|
||||||
|
|
||||||
minimatch@^3.0.2:
|
minimatch@^3.0.4:
|
||||||
version "3.0.3"
|
version "3.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
|
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
||||||
dependencies:
|
dependencies:
|
||||||
brace-expansion "^1.0.0"
|
brace-expansion "^1.1.7"
|
||||||
|
|
||||||
minimist@^1.2.0:
|
minimist@^1.2.0:
|
||||||
version "1.2.0"
|
version "1.2.0"
|
||||||
@ -138,6 +245,17 @@ nan@^2.3.2:
|
|||||||
version "2.6.2"
|
version "2.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45"
|
resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45"
|
||||||
|
|
||||||
|
object-keys@^1.0.8:
|
||||||
|
version "1.0.11"
|
||||||
|
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
|
||||||
|
|
||||||
|
object.getownpropertydescriptors@^2.0.3:
|
||||||
|
version "2.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16"
|
||||||
|
dependencies:
|
||||||
|
define-properties "^1.1.2"
|
||||||
|
es-abstract "^1.5.1"
|
||||||
|
|
||||||
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"
|
||||||
@ -163,8 +281,8 @@ rechoir@^0.6.2:
|
|||||||
resolve "^1.1.6"
|
resolve "^1.1.6"
|
||||||
|
|
||||||
resolve@^1.1.6:
|
resolve@^1.1.6:
|
||||||
version "1.3.2"
|
version "1.3.3"
|
||||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.2.tgz#1f0442c9e0cbb8136e87b9305f932f46c7f28235"
|
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5"
|
||||||
dependencies:
|
dependencies:
|
||||||
path-parse "^1.0.5"
|
path-parse "^1.0.5"
|
||||||
|
|
||||||
@ -172,9 +290,9 @@ semver@^5.3.0:
|
|||||||
version "5.3.0"
|
version "5.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
|
||||||
|
|
||||||
shelljs@^0.7.7:
|
shelljs@^0.7.8:
|
||||||
version "0.7.7"
|
version "0.7.8"
|
||||||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1"
|
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
|
||||||
dependencies:
|
dependencies:
|
||||||
glob "^7.0.0"
|
glob "^7.0.0"
|
||||||
interpret "^1.0.0"
|
interpret "^1.0.0"
|
||||||
@ -191,6 +309,13 @@ 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.4:
|
||||||
|
version "1.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.4.tgz#791c1a4ee6770494064c10b1d2d2b8e6f3105b82"
|
||||||
|
dependencies:
|
||||||
|
smartq "^1.1.1"
|
||||||
|
typings-global "^1.0.16"
|
||||||
|
|
||||||
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"
|
||||||
@ -198,6 +323,24 @@ smartq@^1.1.1:
|
|||||||
typed-promisify "^0.3.0"
|
typed-promisify "^0.3.0"
|
||||||
typings-global "^1.0.14"
|
typings-global "^1.0.14"
|
||||||
|
|
||||||
|
smartq@^1.1.6:
|
||||||
|
version "1.1.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.6.tgz#0c1ff4336d95e95b4f1fdd8ccd7e2c5a323b8412"
|
||||||
|
dependencies:
|
||||||
|
typings-global "^1.0.19"
|
||||||
|
util.promisify "^1.0.0"
|
||||||
|
|
||||||
|
smartshell@^1.0.6:
|
||||||
|
version "1.0.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartshell/-/smartshell-1.0.8.tgz#1535756c0fe8069f7e6da1e3f9cb6c8f77094e42"
|
||||||
|
dependencies:
|
||||||
|
"@types/shelljs" "^0.7.2"
|
||||||
|
"@types/which" "^1.0.28"
|
||||||
|
shelljs "^0.7.8"
|
||||||
|
smartq "^1.1.1"
|
||||||
|
typings-global "^1.0.19"
|
||||||
|
which "^1.2.14"
|
||||||
|
|
||||||
type-detect@0.1.1:
|
type-detect@0.1.1:
|
||||||
version "0.1.1"
|
version "0.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822"
|
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822"
|
||||||
@ -210,12 +353,32 @@ typed-promisify@^0.3.0:
|
|||||||
version "0.3.0"
|
version "0.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/typed-promisify/-/typed-promisify-0.3.0.tgz#1ba0af5e444c87d8047406f18ce49092a1191853"
|
resolved "https://registry.yarnpkg.com/typed-promisify/-/typed-promisify-0.3.0.tgz#1ba0af5e444c87d8047406f18ce49092a1191853"
|
||||||
|
|
||||||
typings-global@^1.0.14, typings-global@^1.0.16:
|
typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.19:
|
||||||
version "1.0.16"
|
version "1.0.19"
|
||||||
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.16.tgz#489b71781af24268750c2899316400a5e482961f"
|
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.19.tgz#3376a72d4de1e5541bf5702248ff64c3e6ea316c"
|
||||||
dependencies:
|
dependencies:
|
||||||
semver "^5.3.0"
|
semver "^5.3.0"
|
||||||
shelljs "^0.7.7"
|
smartshell "^1.0.6"
|
||||||
|
|
||||||
|
typings-global@^1.0.20:
|
||||||
|
version "1.0.20"
|
||||||
|
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.20.tgz#3da769c54db538247c5d877d1d9e97eb2ec981ff"
|
||||||
|
dependencies:
|
||||||
|
semver "^5.3.0"
|
||||||
|
smartshell "^1.0.6"
|
||||||
|
|
||||||
|
util.promisify@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030"
|
||||||
|
dependencies:
|
||||||
|
define-properties "^1.1.2"
|
||||||
|
object.getownpropertydescriptors "^2.0.3"
|
||||||
|
|
||||||
|
which@^1.2.14:
|
||||||
|
version "1.2.14"
|
||||||
|
resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5"
|
||||||
|
dependencies:
|
||||||
|
isexe "^2.0.0"
|
||||||
|
|
||||||
wrappy@1:
|
wrappy@1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
|
Reference in New Issue
Block a user