Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
f184077ab5 | |||
87fa936d5f | |||
df478b173c | |||
95befab964 | |||
f34b889358 |
18
.gitignore
vendored
18
.gitignore
vendored
@ -1,20 +1,4 @@
|
|||||||
.nogit/
|
node_modules/
|
||||||
|
|
||||||
# artifacts
|
|
||||||
coverage/
|
coverage/
|
||||||
public/
|
public/
|
||||||
pages/
|
pages/
|
||||||
|
|
||||||
# installs
|
|
||||||
node_modules/
|
|
||||||
|
|
||||||
# caches
|
|
||||||
.yarn/
|
|
||||||
.cache/
|
|
||||||
.rpt2_cache
|
|
||||||
|
|
||||||
# builds
|
|
||||||
dist/
|
|
||||||
dist_*/
|
|
||||||
|
|
||||||
# custom
|
|
137
.gitlab-ci.yml
137
.gitlab-ci.yml
@ -1,137 +1,86 @@
|
|||||||
# gitzone ci_default
|
# gitzone standard
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
image: hosttoday/ht-docker-node:npmci
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- .npmci_cache/
|
- .yarn/
|
||||||
key: '$CI_BUILD_STAGE'
|
key: "$CI_BUILD_STAGE"
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- security
|
- mirror
|
||||||
- test
|
- test
|
||||||
- release
|
- release
|
||||||
- metadata
|
- trigger
|
||||||
|
- pages
|
||||||
|
|
||||||
# ====================
|
|
||||||
# security stage
|
|
||||||
# ====================
|
|
||||||
mirror:
|
mirror:
|
||||||
stage: security
|
stage: mirror
|
||||||
script:
|
script:
|
||||||
- npmci git mirror
|
- npmci git mirror
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
tags:
|
tags:
|
||||||
- lossless
|
- docker
|
||||||
- docker
|
|
||||||
- notpriv
|
|
||||||
|
|
||||||
auditProductionDependencies:
|
testLEGACY:
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
stage: test
|
||||||
stage: security
|
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci node install legacy
|
||||||
- npmci command npm install --production --ignore-scripts
|
- npmci npm install
|
||||||
- npmci command npm config set registry https://registry.npmjs.org
|
- npmci npm test
|
||||||
- npmci command npm audit --audit-level=high --only=prod --production
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
auditDevDependencies:
|
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
|
||||||
stage: security
|
|
||||||
script:
|
|
||||||
- npmci npm prepare
|
|
||||||
- npmci command npm install --ignore-scripts
|
|
||||||
- npmci command npm config set registry https://registry.npmjs.org
|
|
||||||
- npmci command npm audit --audit-level=high --only=dev
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
# ====================
|
testLTS:
|
||||||
# test stage
|
|
||||||
# ====================
|
|
||||||
|
|
||||||
testStable:
|
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci node install lts
|
||||||
- npmci node install stable
|
- npmci npm install
|
||||||
- npmci npm install
|
- npmci npm test
|
||||||
- npmci npm test
|
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
testBuild:
|
testSTABLE:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci node install stable
|
||||||
- npmci node install stable
|
- npmci npm install
|
||||||
- npmci npm install
|
- npmci npm test
|
||||||
- npmci command npm run build
|
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
release:
|
release:
|
||||||
stage: release
|
stage: release
|
||||||
script:
|
script:
|
||||||
- npmci node install stable
|
- npmci npm prepare
|
||||||
- npmci npm publish
|
- npmci npm publish
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
- lossless
|
- docker
|
||||||
- docker
|
|
||||||
- notpriv
|
|
||||||
|
|
||||||
# ====================
|
|
||||||
# metadata stage
|
|
||||||
# ====================
|
|
||||||
codequality:
|
|
||||||
stage: metadata
|
|
||||||
allow_failure: true
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
script:
|
|
||||||
- npmci command npm install -g tslint typescript
|
|
||||||
- npmci npm prepare
|
|
||||||
- npmci npm install
|
|
||||||
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
|
||||||
tags:
|
|
||||||
- lossless
|
|
||||||
- docker
|
|
||||||
- priv
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
stage: metadata
|
stage: trigger
|
||||||
script:
|
script:
|
||||||
- npmci trigger
|
- npmci trigger
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
- lossless
|
- docker
|
||||||
- docker
|
|
||||||
- notpriv
|
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
stage: metadata
|
image: hosttoday/ht-docker-node:npmci
|
||||||
|
stage: pages
|
||||||
script:
|
script:
|
||||||
- npmci node install lts
|
- npmci command yarn global add npmpage
|
||||||
- npmci command npm install -g @gitzone/tsdoc
|
- npmci command npmpage
|
||||||
- npmci npm prepare
|
|
||||||
- npmci npm install
|
|
||||||
- npmci command tsdoc
|
|
||||||
tags:
|
tags:
|
||||||
- lossless
|
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
allow_failure: true
|
|
||||||
|
29
.vscode/launch.json
vendored
29
.vscode/launch.json
vendored
@ -1,29 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "0.2.0",
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"name": "current file",
|
|
||||||
"type": "node",
|
|
||||||
"request": "launch",
|
|
||||||
"args": [
|
|
||||||
"${relativeFile}"
|
|
||||||
],
|
|
||||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
|
||||||
"cwd": "${workspaceRoot}",
|
|
||||||
"protocol": "inspector",
|
|
||||||
"internalConsoleOptions": "openOnSessionStart"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "test.ts",
|
|
||||||
"type": "node",
|
|
||||||
"request": "launch",
|
|
||||||
"args": [
|
|
||||||
"test/test.ts"
|
|
||||||
],
|
|
||||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
|
||||||
"cwd": "${workspaceRoot}",
|
|
||||||
"protocol": "inspector",
|
|
||||||
"internalConsoleOptions": "openOnSessionStart"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
26
.vscode/settings.json
vendored
26
.vscode/settings.json
vendored
@ -1,26 +0,0 @@
|
|||||||
{
|
|
||||||
"json.schemas": [
|
|
||||||
{
|
|
||||||
"fileMatch": ["/npmextra.json"],
|
|
||||||
"schema": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"npmci": {
|
|
||||||
"type": "object",
|
|
||||||
"description": "settings for npmci"
|
|
||||||
},
|
|
||||||
"gitzone": {
|
|
||||||
"type": "object",
|
|
||||||
"description": "settings for gitzone",
|
|
||||||
"properties": {
|
|
||||||
"projectType": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": ["website", "element", "service", "npm", "wcc"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
26
README.md
Normal file
26
README.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# 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/)
|
||||||
|
|
||||||
|
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)
|
3
dist/index.d.ts
vendored
Normal file
3
dist/index.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import 'typings-global';
|
||||||
|
export { expect } from 'smartchai';
|
||||||
|
export { tap } from './tapbundle.classes.tap';
|
8
dist/index.js
vendored
Normal file
8
dist/index.js
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
require("typings-global");
|
||||||
|
var smartchai_1 = require("smartchai");
|
||||||
|
exports.expect = smartchai_1.expect;
|
||||||
|
var tapbundle_classes_tap_1 = require("./tapbundle.classes.tap");
|
||||||
|
exports.tap = tapbundle_classes_tap_1.tap;
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2Qix1Q0FBa0M7QUFBekIsNkJBQUEsTUFBTSxDQUFBO0FBQ2YsaUVBQTZDO0FBQXBDLHNDQUFBLEdBQUcsQ0FBQSJ9
|
42
dist/tapbundle.classes.tap.d.ts
vendored
Normal file
42
dist/tapbundle.classes.tap.d.ts
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
import { TapTest, ITestFunction } from './tapbundle.classes.taptest';
|
||||||
|
import { TapWrap, ITapWrapFunction } from './tapbundle.classes.tapwrap';
|
||||||
|
export declare class Tap {
|
||||||
|
/**
|
||||||
|
* skip a test
|
||||||
|
*/
|
||||||
|
skip: {
|
||||||
|
test: (descriptionArg: string, functionArg: ITestFunction) => 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>;
|
||||||
|
/**
|
||||||
|
* wraps function
|
||||||
|
*/
|
||||||
|
wrap(functionArg: ITapWrapFunction): TapWrap;
|
||||||
|
/**
|
||||||
|
* 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;
|
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLmNsYXNzZXMudGFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvdGFwYnVuZGxlLmNsYXNzZXMudGFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFFQSwyRUFBb0U7QUFDcEUsMkVBQXVFO0FBQ3ZFO0lBQUE7UUFFRTs7V0FFRztRQUNILFNBQUksR0FBRztZQUNMLElBQUksRUFBRSxDQUFDLGNBQXNCLEVBQUUsV0FBMEIsRUFBRSxFQUFFO2dCQUMzRCxPQUFPLENBQUMsR0FBRyxDQUFDLGlCQUFpQixjQUFjLEVBQUUsQ0FBQyxDQUFBO1lBQ2hELENBQUM7U0FDRixDQUFBO1FBRU8sV0FBTSxHQUFjLEVBQUUsQ0FBQTtJQTZFaEMsQ0FBQztJQTNFQzs7OztPQUlHO0lBQ0csSUFBSSxDQUFFLGVBQXVCLEVBQUUsWUFBMkI7O1lBQzlELElBQUksU0FBUyxHQUFHLElBQUksbUNBQU8sQ0FBQztnQkFDMUIsV0FBVyxFQUFFLGVBQWU7Z0JBQzVCLFlBQVksRUFBRSxZQUFZO2dCQUMxQixRQUFRLEVBQUUsS0FBSzthQUNoQixDQUFDLENBQUE7WUFDRixJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQTtZQUMzQixNQUFNLENBQUMsU0FBUyxDQUFBO1FBQ2xCLENBQUM7S0FBQTtJQUVEOztPQUVHO0lBQ0gsSUFBSSxDQUFFLFdBQTZCO1FBQ2pDLE1BQU0sQ0FBQyxJQUFJLG1DQUFPLENBQUMsV0FBVyxDQUFDLENBQUE7SUFDakMsQ0FBQztJQUVEOzs7O09BSUc7SUFDSCxZQUFZLENBQUUsZUFBdUIsRUFBRSxZQUEyQjtRQUNoRSxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxJQUFJLG1DQUFPLENBQUM7WUFDM0IsV0FBVyxFQUFFLGVBQWU7WUFDNUIsWUFBWSxFQUFFLFlBQVk7WUFDMUIsUUFBUSxFQUFFLElBQUk7U0FDZixDQUFDLENBQUMsQ0FBQTtJQUNMLENBQUM7SUFFRDs7OztPQUlHO0lBQ0gsV0FBVyxDQUFFLGVBQXVCLEVBQUUsWUFBMkI7SUFFakUsQ0FBQztJQUVEOztPQUVHO0lBQ0csS0FBSzs7WUFDVCxJQUFJLFlBQVksR0FBbUIsRUFBRSxDQUFBO1lBRXJDLHFDQUFxQztZQUNyQyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLE1BQU0sS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDO2dCQUM3QixPQUFPLENBQUMsR0FBRyxDQUFDLGtDQUFrQyxDQUFDLENBQUE7Z0JBQy9DLE1BQU0sQ0FBQTtZQUNSLENBQUM7WUFFRCxPQUFPLENBQUMsR0FBRyxDQUFDLE1BQU0sSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLEVBQUUsQ0FBQyxDQUFBO1lBQ3ZDLEdBQUcsQ0FBQyxDQUFDLElBQUksT0FBTyxHQUFHLENBQUMsRUFBRSxPQUFPLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLEVBQUUsT0FBTyxFQUFFLEVBQUUsQ0FBQztnQkFDOUQsSUFBSSxXQUFXLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBRSxPQUFPLENBQUUsQ0FBQTtnQkFDeEMsSUFBSSxXQUFXLEdBQUcsV0FBVyxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQTtnQkFDMUMsRUFBRSxDQUFDLENBQUMsV0FBVyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUM7b0JBQ3pCLFlBQVksQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLENBQUE7Z0JBQ2hDLENBQUM7Z0JBQUMsSUFBSSxDQUFDLENBQUM7b0JBQ04sTUFBTSxXQUFXLENBQUE7Z0JBQ25CLENBQUM7WUFDSCxDQUFDO1lBQ0QsTUFBTSxPQUFPLENBQUMsR0FBRyxDQUFDLFlBQVksQ0FBQyxDQUFBO1FBQ2pDLENBQUM7S0FBQTtJQUVEOztPQUVHO0lBQ0gsS0FBSyxDQUFFLEdBQUc7UUFDUixPQUFPLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxDQUFBO0lBQ2xCLENBQUM7Q0FDRjtBQXhGRCxrQkF3RkM7QUFFVSxRQUFBLEdBQUcsR0FBRyxJQUFJLEdBQUcsRUFBRSxDQUFBIn0=
|
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLmNsYXNzZXMudGFwdGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3RhcGJ1bmRsZS5jbGFzc2VzLnRhcHRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLCtDQUE4QztBQUU5Qyw2RUFBdUQ7QUFFdkQsc0JBQXNCO0FBQ3RCLGlDQUFzQztBQVd0QztJQVVFOztPQUVHO0lBQ0gsWUFBYSxVQUlaO1FBVEQsaUJBQVksR0FBc0IsT0FBTyxDQUFDLE1BQU0sQ0FBQyxLQUFLLEVBQUUsQ0FBQTtRQUN4RCxnQkFBVyxHQUFxQixJQUFJLENBQUMsWUFBWSxDQUFDLE9BQU8sQ0FBQTtRQVN2RCxJQUFJLENBQUMsV0FBVyxHQUFHLFVBQVUsQ0FBQyxXQUFXLENBQUE7UUFDekMsSUFBSSxDQUFDLGNBQWMsR0FBRyxJQUFJLHNCQUFjLEVBQUUsQ0FBQTtRQUMxQyxJQUFJLENBQUMsUUFBUSxHQUFHLFVBQVUsQ0FBQyxRQUFRLENBQUE7UUFDbkMsSUFBSSxDQUFDLE1BQU0sR0FBRyxTQUFTLENBQUE7UUFDdkIsSUFBSSxDQUFDLFFBQVEsR0FBRyxJQUFJLHFDQUFRLENBQUMsSUFBSSxDQUFDLENBQUE7UUFDbEMsSUFBSSxDQUFDLFlBQVksR0FBRyxVQUFVLENBQUMsWUFBWSxDQUFBO0lBQzdDLENBQUM7SUFFRDs7T0FFRztJQUNHLEdBQUcsQ0FBRSxVQUFrQjs7WUFDM0IsSUFBSSxDQUFDLGNBQWMsQ0FBQyxLQUFLLEVBQUUsQ0FBQTtZQUMzQixJQUFJLENBQUM7Z0JBQ0gsTUFBTSxJQUFJLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsQ0FBQTtnQkFDdEMsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sS0FBSyxTQUFTLENBQUMsQ0FBQyxDQUFDO29CQUM5QixNQUFNLElBQUksS0FBSyxDQUFFLGtDQUFrQyxDQUFDLENBQUE7Z0JBQ3RELENBQUM7Z0JBQ0QsSUFBSSxDQUFDLGNBQWMsQ0FBQyxJQUFJLEVBQUUsQ0FBQTtnQkFDMUIsT0FBTyxDQUFDLEdBQUcsQ0FBQyxNQUFNLFVBQVUsR0FBRyxDQUFDLE1BQU0sSUFBSSxDQUFDLFdBQVcsV0FBVyxJQUFJLENBQUMsY0FBYyxDQUFDLFlBQVksSUFBSSxDQUFDLENBQUE7Z0JBQ3RHLElBQUksQ0FBQyxNQUFNLEdBQUcsU0FBUyxDQUFBO2dCQUN2QixJQUFJLENBQUMsWUFBWSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQTtZQUNqQyxDQUFDO1lBQUMsS0FBSyxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQztnQkFDYixJQUFJLENBQUMsY0FBYyxDQUFDLElBQUksRUFBRSxDQUFBO2dCQUMxQixPQUFPLENBQUMsR0FBRyxDQUFDLFVBQVUsVUFBVSxHQUFHLENBQUMsTUFBTSxJQUFJLENBQUMsV0FBVyxXQUFXLElBQUksQ0FBQyxjQUFjLENBQUMsWUFBWSxJQUFJLENBQUMsQ0FBQTtnQkFDMUcsSUFBSSxDQUFDLFlBQVksQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUE7Z0JBRS9CLDJDQUEyQztnQkFDM0MsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sS0FBSyxTQUFTLENBQUMsQ0FBQyxDQUFDO29CQUM5QixJQUFJLENBQUMsTUFBTSxHQUFHLG1CQUFtQixDQUFBO29CQUNqQyxPQUFPLENBQUMsR0FBRyxDQUFDLHlFQUF5RSxDQUFDLENBQUE7Z0JBQ3hGLENBQUM7Z0JBRUQsaUNBQWlDO2dCQUNqQyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsY0FBYyxDQUFDLENBQUMsQ0FBQztvQkFDeEIsT0FBTyxDQUFDLEdBQUcsQ0FBQywrQkFBK0IsQ0FBQyxDQUFBO2dCQUM5QyxDQUFDO2dCQUNELE9BQU8sQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUE7WUFDbEIsQ0FBQztRQUNILENBQUM7S0FBQTtDQUNGO0FBMURELDBCQTBEQyJ9
|
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
Normal file
6
dist/tapbundle.plugins.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import 'typings-global';
|
||||||
|
import * as early from 'early';
|
||||||
|
import * as leakage from 'leakage';
|
||||||
|
import * as smartdelay from 'smartdelay';
|
||||||
|
import * as smartq from 'smartq';
|
||||||
|
export { early, smartdelay, smartq, leakage };
|
12
dist/tapbundle.plugins.js
vendored
Normal file
12
dist/tapbundle.plugins.js
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
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");
|
||||||
|
exports.smartq = smartq;
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy90YXBidW5kbGUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2QiwrQkFBOEI7QUFNNUIsc0JBQUs7QUFMUCxtQ0FBa0M7QUFRaEMsMEJBQU87QUFQVCx5Q0FBd0M7QUFLdEMsZ0NBQVU7QUFKWixpQ0FBZ0M7QUFLOUIsd0JBQU0ifQ==
|
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 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)
|
22
license
22
license
@ -1,22 +0,0 @@
|
|||||||
**MIT License**
|
|
||||||
|
|
||||||
Copright © 2016 Lossless GmbH
|
|
||||||
Copyright © 2016 - 2017 Martin Donath
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to
|
|
||||||
deal in the Software without restriction, including without limitation the
|
|
||||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
||||||
sell copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
||||||
IN THE SOFTWARE.
|
|
@ -1,22 +1,12 @@
|
|||||||
{
|
{
|
||||||
"npmci": {
|
"npmci": {
|
||||||
"npmGlobalTools": [],
|
"npmGlobalTools": [
|
||||||
"npmAccessLevel": "public"
|
"npmts"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"npmts": {
|
"npmts": {
|
||||||
"testConfig": {
|
"testConfig": {
|
||||||
"parallel": false
|
"parallel": false
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"gitzone": {
|
|
||||||
"projectType": "npm",
|
|
||||||
"module": {
|
|
||||||
"githost": "gitlab.com",
|
|
||||||
"gitscope": "pushrocks",
|
|
||||||
"gitrepo": "tapbundle",
|
|
||||||
"shortDescription": "tap bundled for tapbuffer",
|
|
||||||
"npmPackagename": "@pushrocks/tapbundle",
|
|
||||||
"license": "MIT"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
27398
package-lock.json
generated
27398
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
51
package.json
51
package.json
@ -1,13 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/tapbundle",
|
"name": "tapbundle",
|
||||||
"private": false,
|
"version": "1.1.3",
|
||||||
"version": "4.0.2",
|
|
||||||
"description": "tap bundled for tapbuffer",
|
"description": "tap bundled for tapbuffer",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist_ts/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(tstest test/)",
|
"test": "(npmts)"
|
||||||
"build": "(tsbuild --web)"
|
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -20,35 +18,12 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/pushrocks/tapbundle#README",
|
"homepage": "https://gitlab.com/pushrocks/tapbundle#README",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@open-wc/testing-helpers": "^2.0.3",
|
"@types/node": "^8.0.33",
|
||||||
"@pushrocks/smartdelay": "^2.0.13",
|
"early": "^2.1.1",
|
||||||
"@pushrocks/smartenv": "^4.0.16",
|
"leakage": "^0.3.0",
|
||||||
"@pushrocks/smartexpect": "^1.0.10",
|
"smartchai": "^1.0.3",
|
||||||
"@pushrocks/smartpromise": "^3.1.6",
|
"smartdelay": "^1.0.4",
|
||||||
"@pushrocks/smarttime": "^3.0.43"
|
"smartq": "^1.1.6",
|
||||||
},
|
"typings-global": "^1.0.20"
|
||||||
"devDependencies": {
|
}
|
||||||
"@gitzone/tsbuild": "^2.1.29",
|
|
||||||
"@gitzone/tsrun": "^1.2.18",
|
|
||||||
"@gitzone/tstest": "^1.0.60",
|
|
||||||
"@types/node": "^17.0.14",
|
|
||||||
"randomstring": "^1.2.2",
|
|
||||||
"tslint": "^6.1.3",
|
|
||||||
"tslint-config-prettier": "^1.18.0"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"ts/**/*",
|
|
||||||
"ts_web/**/*",
|
|
||||||
"dist/**/*",
|
|
||||||
"dist_*/**/*",
|
|
||||||
"dist_ts/**/*",
|
|
||||||
"dist_ts_web/**/*",
|
|
||||||
"assets/**/*",
|
|
||||||
"cli.js",
|
|
||||||
"npmextra.json",
|
|
||||||
"readme.md"
|
|
||||||
],
|
|
||||||
"browserslist": [
|
|
||||||
"last 1 chrome versions"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
83
readme.md
83
readme.md
@ -1,83 +0,0 @@
|
|||||||
# @pushrocks/tapbundle
|
|
||||||
tap bundled for tapbuffer
|
|
||||||
|
|
||||||
## Availabililty and Links
|
|
||||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/tapbundle)
|
|
||||||
* [gitlab.com (source)](https://gitlab.com/pushrocks/tapbundle)
|
|
||||||
* [github.com (source mirror)](https://github.com/pushrocks/tapbundle)
|
|
||||||
* [docs (typedoc)](https://pushrocks.gitlab.io/tapbundle/)
|
|
||||||
|
|
||||||
## Status for master
|
|
||||||
|
|
||||||
Status Category | Status Badge
|
|
||||||
-- | --
|
|
||||||
GitLab Pipelines | [](https://lossless.cloud)
|
|
||||||
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
|
||||||
npm | [](https://lossless.cloud)
|
|
||||||
Snyk | [](https://lossless.cloud)
|
|
||||||
TypeScript Support | [](https://lossless.cloud)
|
|
||||||
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
|
||||||
Code Style | [](https://lossless.cloud)
|
|
||||||
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
|
||||||
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
|
||||||
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
|
||||||
Platform support | [](https://lossless.cloud) [](https://lossless.cloud)
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Use TypeScript for best in class instellisense.
|
|
||||||
|
|
||||||
A few words on TypeScript
|
|
||||||
|
|
||||||
### Included in this package
|
|
||||||
|
|
||||||
- tap compatible testing framework written in TypeScript
|
|
||||||
- a collection of test tools
|
|
||||||
- **code** testing framework with typings
|
|
||||||
|
|
||||||
### Write your first tests
|
|
||||||
|
|
||||||
```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)
|
|
||||||
```
|
|
||||||
|
|
||||||
## Contribution
|
|
||||||
|
|
||||||
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
|
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
[](https://maintainedby.lossless.com)
|
|
@ -1,45 +0,0 @@
|
|||||||
import { tap, expect, webhelpers } from '../ts/index';
|
|
||||||
|
|
||||||
tap.preTask('custompretask', async () => {
|
|
||||||
console.log('this is a pretask');
|
|
||||||
});
|
|
||||||
|
|
||||||
tap.test('should have access to webhelpers', async () => {
|
|
||||||
const myElement = await webhelpers.fixture(webhelpers.html`<div></div>`);
|
|
||||||
expect(myElement).toBeInstanceOf(HTMLElement);
|
|
||||||
console.log(myElement);
|
|
||||||
});
|
|
||||||
|
|
||||||
const test1 = tap.test('my first test -> expect true to be true', async () => {
|
|
||||||
return expect(true).toBeTrue();
|
|
||||||
});
|
|
||||||
|
|
||||||
const test2 = tap.test('my second test', async (tools) => {
|
|
||||||
await tools.delayFor(50);
|
|
||||||
});
|
|
||||||
|
|
||||||
const 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).toBeTrue();
|
|
||||||
expect((await test2).hrtMeasurement.milliSeconds > 10).toBeTrue();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
const test4 = tap.skip.test('my 4th test -> should fail', async (tools) => {
|
|
||||||
tools.allowFailure();
|
|
||||||
expect(false).toBeTrue();
|
|
||||||
});
|
|
||||||
|
|
||||||
const test5 = tap.test('my 5th test -> should pass in about 500ms', async (tools) => {
|
|
||||||
tools.timeout(1000);
|
|
||||||
await tools.delayFor(500);
|
|
||||||
});
|
|
||||||
|
|
||||||
const test6 = tap.skip.test('my 6th test -> should fail after 1000ms', async (tools) => {
|
|
||||||
tools.allowFailure();
|
|
||||||
tools.timeout(1000);
|
|
||||||
await tools.delayFor(100);
|
|
||||||
});
|
|
||||||
|
|
||||||
tap.start();
|
|
@ -1,5 +1,10 @@
|
|||||||
import { tap, expect, TapWrap } from '../ts/index';
|
import { tap, expect } from '../ts/index'
|
||||||
|
|
||||||
tap.test('should run a test', async () => {});
|
let tapwrap = tap.wrap(async () => {
|
||||||
|
tap.test('should do something', async () => {
|
||||||
|
console.log('test1')
|
||||||
|
})
|
||||||
|
tap.start()
|
||||||
|
})
|
||||||
|
|
||||||
tap.start();
|
tapwrap.run()
|
||||||
|
62
test/test.ts
62
test/test.ts
@ -1,44 +1,32 @@
|
|||||||
import { tap, expect } from '../ts/index';
|
import { tap, expect } from '../ts/index'
|
||||||
|
|
||||||
tap.preTask('hi there', async () => {
|
let test1 = tap.test('my first test -> expect true to be true', async () => {
|
||||||
console.log('this is a pretask');
|
return expect(true).to.be.true
|
||||||
});
|
})
|
||||||
|
|
||||||
const test1 = tap.test('my first test -> expect true to be true', async () => {
|
let test2 = tap.test('my second test', async (tools) => {
|
||||||
return expect(true).toBeTrue();
|
await tools.delayFor(1000)
|
||||||
});
|
})
|
||||||
|
|
||||||
const test2 = tap.test('my second test', async (tools) => {
|
let test3 = tap.test('my third test -> test2 should take longer than test1 and endure at least 1000ms', async () => {
|
||||||
await tools.delayFor(1000);
|
expect((await test1).hrtMeasurement.milliSeconds < (await test2).hrtMeasurement.milliSeconds).to.be.true
|
||||||
});
|
expect((await test2).hrtMeasurement.milliSeconds > 1000).to.be.true
|
||||||
|
})
|
||||||
|
|
||||||
const test3 = tap.test(
|
let test4 = tap.skip.test('my 4th test -> should fail', async (tools) => {
|
||||||
'my third test -> test2 should take longer than test1 and endure at least 1000ms',
|
tools.allowFailure()
|
||||||
async () => {
|
expect(false).to.be.true
|
||||||
expect(
|
})
|
||||||
(await test1.testPromise).hrtMeasurement.milliSeconds <
|
|
||||||
(await test2).hrtMeasurement.milliSeconds
|
|
||||||
).toBeTrue();
|
|
||||||
expect((await test2.testPromise).hrtMeasurement.milliSeconds > 1000).toBeTrue();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
const test4 = tap.test('my 4th test -> should fail', async (tools) => {
|
let test5 = tap.test('my 5th test -> should pass in about 500ms', async (tools) => {
|
||||||
tools.allowFailure();
|
tools.timeout(1000)
|
||||||
expect(false).toBeFalse();
|
await tools.delayFor(500)
|
||||||
return 'hello';
|
})
|
||||||
});
|
|
||||||
|
|
||||||
const test5 = tap.test('my 5th test -> should pass in about 500ms', async (tools) => {
|
let test6 = tap.skip.test('my 6th test -> should fail after 1000ms', async (tools) => {
|
||||||
const test4Result = await test4.testResultPromise;
|
tools.allowFailure()
|
||||||
tools.timeout(1000);
|
tools.timeout(1000)
|
||||||
await tools.delayFor(500);
|
await tools.delayFor(2000)
|
||||||
});
|
})
|
||||||
|
|
||||||
const test6 = tap.skip.test('my 6th test -> should fail after 1000ms', async (tools) => {
|
tap.start()
|
||||||
tools.allowFailure();
|
|
||||||
tools.timeout(1000);
|
|
||||||
await tools.delayFor(2000);
|
|
||||||
});
|
|
||||||
|
|
||||||
tap.start();
|
|
||||||
|
13
ts/index.ts
13
ts/index.ts
@ -1,10 +1,3 @@
|
|||||||
export { tap } from './tapbundle.classes.tap';
|
import 'typings-global'
|
||||||
export { TapWrap } from './tapbundle.classes.tapwrap';
|
export { expect } from 'smartchai'
|
||||||
export { webhelpers } from './webhelpers';
|
export { tap } from './tapbundle.classes.tap'
|
||||||
|
|
||||||
import { expect, expectAsync } from '@pushrocks/smartexpect';
|
|
||||||
|
|
||||||
export {
|
|
||||||
expect,
|
|
||||||
expectAsync
|
|
||||||
}
|
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
import * as plugins from './tapbundle.plugins';
|
|
||||||
import { TapTools } from './tapbundle.classes.taptools';
|
|
||||||
|
|
||||||
export interface IPreTaskFunction {
|
|
||||||
(tapTools?: TapTools): Promise<any>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class PreTask {
|
|
||||||
public description: string;
|
|
||||||
public preTaskFunction: IPreTaskFunction;
|
|
||||||
|
|
||||||
constructor(descriptionArg: string, preTaskFunctionArg: IPreTaskFunction) {
|
|
||||||
this.description = descriptionArg;
|
|
||||||
this.preTaskFunction = preTaskFunctionArg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async run() {
|
|
||||||
console.log(`::__PRETASK: ${this.description}`);
|
|
||||||
await this.preTaskFunction(new TapTools(null));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,59 +1,40 @@
|
|||||||
import * as plugins from './tapbundle.plugins';
|
import * as plugins from './tapbundle.plugins'
|
||||||
|
|
||||||
import { IPreTaskFunction, PreTask } from './tapbundle.classes.pretask';
|
import { TapTest, ITestFunction } from './tapbundle.classes.taptest'
|
||||||
import { TapTest, ITestFunction } from './tapbundle.classes.taptest';
|
import { TapWrap, ITapWrapFunction } from './tapbundle.classes.tapwrap'
|
||||||
export class Tap <T> {
|
export class Tap {
|
||||||
/**
|
|
||||||
* skips a test
|
|
||||||
* tests marked with tap.skip.test() are never executed
|
|
||||||
*/
|
|
||||||
public skip = {
|
|
||||||
test: (descriptionArg: string, functionArg: ITestFunction<T>) => {
|
|
||||||
console.log(`skipped test: ${descriptionArg}`);
|
|
||||||
},
|
|
||||||
testParallel: (descriptionArg: string, functionArg: ITestFunction<T>) => {
|
|
||||||
console.log(`skipped test: ${descriptionArg}`);
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* only executes tests marked as ONLY
|
* skip a test
|
||||||
*/
|
*/
|
||||||
public only = {
|
skip = {
|
||||||
test: (descriptionArg: string, testFunctionArg: ITestFunction<T>) => {
|
test: (descriptionArg: string, functionArg: ITestFunction) => {
|
||||||
this.test(descriptionArg, testFunctionArg, 'only');
|
console.log(`skipped test: ${descriptionArg}`)
|
||||||
},
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
private _tapPreTasks: PreTask[] = [];
|
private _tests: TapTest[] = []
|
||||||
private _tapTests: TapTest<any>[] = [];
|
|
||||||
private _tapTestsOnly: TapTest<any>[] = [];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
|
||||||
*/
|
*/
|
||||||
public test(
|
async test (testDescription: string, testFunction: ITestFunction) {
|
||||||
testDescription: string,
|
let localTest = new TapTest({
|
||||||
testFunction: ITestFunction<T>,
|
|
||||||
modeArg: 'normal' | 'only' | 'skip' = 'normal'
|
|
||||||
): TapTest<T> {
|
|
||||||
const localTest = new TapTest<T>({
|
|
||||||
description: testDescription,
|
description: testDescription,
|
||||||
testFunction,
|
testFunction: testFunction,
|
||||||
parallel: false,
|
parallel: false
|
||||||
});
|
})
|
||||||
if (modeArg === 'normal') {
|
this._tests.push(localTest)
|
||||||
this._tapTests.push(localTest);
|
return localTest
|
||||||
} else if (modeArg === 'only') {
|
|
||||||
this._tapTestsOnly.push(localTest);
|
|
||||||
}
|
|
||||||
return localTest;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public preTask(descriptionArg: string, functionArg: IPreTaskFunction) {
|
/**
|
||||||
this._tapPreTasks.push(new PreTask(descriptionArg, functionArg));
|
* wraps function
|
||||||
|
*/
|
||||||
|
wrap (functionArg: ITapWrapFunction) {
|
||||||
|
return new TapWrap(functionArg)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -61,94 +42,55 @@ export class Tap <T> {
|
|||||||
* @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
|
||||||
*/
|
*/
|
||||||
public testParallel(testDescription: string, testFunction: ITestFunction<T>) {
|
testParallel (testDescription: string, testFunction: ITestFunction) {
|
||||||
this._tapTests.push(
|
this._tests.push(new TapTest({
|
||||||
new TapTest({
|
description: testDescription,
|
||||||
description: testDescription,
|
testFunction: testFunction,
|
||||||
testFunction,
|
parallel: true
|
||||||
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
|
* starts the test evaluation
|
||||||
*/
|
*/
|
||||||
public async start(optionsArg?: { throwOnError: boolean }) {
|
async start () {
|
||||||
// lets set the tapbundle promise
|
let promiseArray: Promise<any>[] = []
|
||||||
const smartenvInstance = new plugins.smartenv.Smartenv();
|
|
||||||
smartenvInstance.isBrowser
|
|
||||||
? ((globalThis as any).tapbundleDeferred = plugins.smartpromise.defer())
|
|
||||||
: null;
|
|
||||||
|
|
||||||
// lets continue with running the tests
|
|
||||||
const promiseArray: Array<Promise<any>> = [];
|
|
||||||
|
|
||||||
// safeguard against empty test array
|
// safeguard against empty test array
|
||||||
if (this._tapTests.length === 0) {
|
if (this._tests.length === 0) {
|
||||||
console.log('no tests specified. Ending here!');
|
console.log('no tests specified. Ending here!')
|
||||||
// TODO: throw proper error
|
return
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// determine which tests to run
|
console.log(`1..${this._tests.length}`)
|
||||||
let concerningTests: TapTest[];
|
for (let testKey = 0; testKey < this._tests.length; testKey++) {
|
||||||
if (this._tapTestsOnly.length > 0) {
|
let currentTest = this._tests[ testKey ]
|
||||||
concerningTests = this._tapTestsOnly;
|
let testPromise = currentTest.run(testKey)
|
||||||
} else {
|
|
||||||
concerningTests = this._tapTests;
|
|
||||||
}
|
|
||||||
|
|
||||||
// lets run the pretasks
|
|
||||||
for (const preTask of this._tapPreTasks) {
|
|
||||||
await preTask.run();
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(`1..${concerningTests.length}`);
|
|
||||||
for (let testKey = 0; testKey < concerningTests.length; testKey++) {
|
|
||||||
const currentTest = concerningTests[testKey];
|
|
||||||
const testPromise = currentTest.run(testKey);
|
|
||||||
if (currentTest.parallel) {
|
if (currentTest.parallel) {
|
||||||
promiseArray.push(testPromise);
|
promiseArray.push(testPromise)
|
||||||
} else {
|
} else {
|
||||||
await testPromise;
|
await testPromise
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await Promise.all(promiseArray);
|
await Promise.all(promiseArray)
|
||||||
|
|
||||||
// when tests have been run and all promises are fullfilled
|
|
||||||
const failReasons: string[] = [];
|
|
||||||
const executionNotes: string[] = [];
|
|
||||||
// collect failed tests
|
|
||||||
for (const tapTest of concerningTests) {
|
|
||||||
if (tapTest.status !== 'success') {
|
|
||||||
failReasons.push(
|
|
||||||
`Test ${tapTest.testKey + 1} failed with status ${tapTest.status}:\n` +
|
|
||||||
`|| ${tapTest.description}\n` +
|
|
||||||
`|| for more information please take a look the logs above`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// render fail Reasons
|
|
||||||
for (const failReason of failReasons) {
|
|
||||||
console.log(failReason);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (optionsArg && optionsArg.throwOnError && failReasons.length > 0) {
|
|
||||||
if (!smartenvInstance.isBrowser) process.exit(1);
|
|
||||||
}
|
|
||||||
if (smartenvInstance.isBrowser) {
|
|
||||||
(globalThis as any).tapbundleDeferred.resolve();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* handle errors
|
* handle errors
|
||||||
*/
|
*/
|
||||||
public threw(err: Error) {
|
threw (err) {
|
||||||
console.log(err);
|
console.log(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export let tap = new Tap();
|
export let tap = new Tap()
|
||||||
|
|
||||||
|
@ -1,81 +1,75 @@
|
|||||||
import * as plugins from './tapbundle.plugins';
|
import * as plugins from './tapbundle.plugins'
|
||||||
import { tapCreator } from './tapbundle.tapcreator';
|
import { tapCreator } from './tapbundle.tapcreator'
|
||||||
import { TapTools } from './tapbundle.classes.taptools';
|
import { TapTools } from './tapbundle.classes.taptools'
|
||||||
|
|
||||||
// imported interfaces
|
// imported interfaces
|
||||||
import { Deferred } from '@pushrocks/smartpromise';
|
import { HrtMeasurement } from 'early'
|
||||||
import { HrtMeasurement } from '@pushrocks/smarttime';
|
import { Deferred } from 'smartq'
|
||||||
|
|
||||||
// interfaces
|
// interfaces
|
||||||
export type TTestStatus = 'success' | 'error' | 'pending' | 'errorAfterSuccess' | 'timeout';
|
export type TTestStatus = 'success' | 'error' | 'pending' | 'errorAfterSuccess' | 'timeout'
|
||||||
|
|
||||||
export interface ITestFunction <T> { (tapTools?: TapTools): Promise<T> };
|
export interface ITestFunction {
|
||||||
|
(tapTools?: TapTools): Promise<any>
|
||||||
|
}
|
||||||
|
|
||||||
export class TapTest <T = unknown> {
|
|
||||||
public description: string;
|
export class TapTest {
|
||||||
public failureAllowed: boolean;
|
description: string
|
||||||
public hrtMeasurement: HrtMeasurement;
|
failureAllowed: boolean
|
||||||
public parallel: boolean;
|
hrtMeasurement: HrtMeasurement
|
||||||
public status: TTestStatus;
|
parallel: boolean
|
||||||
public tapTools: TapTools;
|
status: TTestStatus
|
||||||
public testFunction: ITestFunction<T>;
|
tapTools: TapTools
|
||||||
public testKey: number; // the testKey the position in the test qeue. Set upon calling .run()
|
testFunction: ITestFunction
|
||||||
private testDeferred: Deferred<TapTest<T>> = plugins.smartpromise.defer();
|
testDeferred: Deferred<TapTest> = plugins.smartq.defer()
|
||||||
public testPromise: Promise<TapTest<T>> = this.testDeferred.promise;
|
testPromise: Promise<TapTest> = this.testDeferred.promise
|
||||||
private testResultDeferred: Deferred<T> = plugins.smartpromise.defer();
|
|
||||||
public testResultPromise: Promise<T> = this.testResultDeferred.promise;
|
|
||||||
/**
|
/**
|
||||||
* constructor
|
* constructor
|
||||||
*/
|
*/
|
||||||
constructor(optionsArg: { description: string; testFunction: ITestFunction<T>; parallel: boolean }) {
|
constructor (optionsArg: {
|
||||||
this.description = optionsArg.description;
|
description: string,
|
||||||
this.hrtMeasurement = new HrtMeasurement();
|
testFunction: ITestFunction,
|
||||||
this.parallel = optionsArg.parallel;
|
parallel: boolean
|
||||||
this.status = 'pending';
|
}) {
|
||||||
this.tapTools = new TapTools(this);
|
this.description = optionsArg.description
|
||||||
this.testFunction = optionsArg.testFunction;
|
this.hrtMeasurement = new HrtMeasurement()
|
||||||
|
this.parallel = optionsArg.parallel
|
||||||
|
this.status = 'pending'
|
||||||
|
this.tapTools = new TapTools(this)
|
||||||
|
this.testFunction = optionsArg.testFunction
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* run the test
|
* run the test
|
||||||
*/
|
*/
|
||||||
public async run(testKeyArg: number) {
|
async run (testKeyArg: number) {
|
||||||
this.hrtMeasurement.start();
|
this.hrtMeasurement.start()
|
||||||
this.testKey = testKeyArg;
|
|
||||||
const testNumber = testKeyArg + 1;
|
|
||||||
try {
|
try {
|
||||||
const testReturnValue = await this.testFunction(this.tapTools);
|
await this.testFunction(this.tapTools)
|
||||||
if (this.status === 'timeout') {
|
if (this.status === 'timeout') {
|
||||||
throw new Error('Test succeeded, but timed out...');
|
throw new Error ('Test succeeded, but timed out...')
|
||||||
}
|
}
|
||||||
this.hrtMeasurement.stop();
|
this.hrtMeasurement.stop()
|
||||||
console.log(
|
console.log(`ok ${testKeyArg + 1} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms`)
|
||||||
`ok ${testNumber} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms`
|
this.status = 'success'
|
||||||
);
|
this.testDeferred.resolve(this)
|
||||||
this.status = 'success';
|
} catch (err) {
|
||||||
this.testDeferred.resolve(this);
|
this.hrtMeasurement.stop()
|
||||||
this.testResultDeferred.resolve(testReturnValue);
|
console.log(`not ok ${testKeyArg + 1} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms`)
|
||||||
} catch (err: any) {
|
this.testDeferred.resolve(this)
|
||||||
this.hrtMeasurement.stop();
|
|
||||||
console.log(
|
|
||||||
`not ok ${testNumber} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms`
|
|
||||||
);
|
|
||||||
this.testDeferred.resolve(this);
|
|
||||||
this.testResultDeferred.resolve(err);
|
|
||||||
|
|
||||||
// if the test has already succeeded before
|
// if the test has already succeeded before
|
||||||
if (this.status === 'success') {
|
if (this.status === 'success') {
|
||||||
this.status = 'errorAfterSuccess';
|
this.status = 'errorAfterSuccess'
|
||||||
console.log('!!! ALERT !!!: weird behaviour, since test has been already successfull');
|
console.log('!!! ALERT !!!: weird behaviour, since test has been already successfull')
|
||||||
} else {
|
|
||||||
this.status = 'error';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the test is allowed to fail
|
// if the test is allowed to fail
|
||||||
if (this.failureAllowed) {
|
if (this.failureAllowed) {
|
||||||
console.log(`please note: failure allowed!`);
|
console.log(`please note: failure allowed!`)
|
||||||
}
|
}
|
||||||
console.log(err);
|
console.log(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,58 +1,38 @@
|
|||||||
import * as plugins from './tapbundle.plugins';
|
import * as plugins from './tapbundle.plugins'
|
||||||
import { TapTest } from './tapbundle.classes.taptest';
|
import { TapTest } from './tapbundle.classes.taptest'
|
||||||
|
|
||||||
export interface IPromiseFunc {
|
|
||||||
(): Promise<any>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class TapTools {
|
export class TapTools {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the referenced TapTest
|
* the referenced TapTest
|
||||||
*/
|
*/
|
||||||
private _tapTest: TapTest;
|
private _tapTest: TapTest
|
||||||
|
|
||||||
constructor(TapTestArg: TapTest<any>) {
|
constructor (TapTestArg) {
|
||||||
this._tapTest = TapTestArg;
|
this._tapTest = TapTestArg
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* allow failure
|
* allow failure
|
||||||
*/
|
*/
|
||||||
public allowFailure() {
|
allowFailure () {
|
||||||
this._tapTest.failureAllowed = true;
|
this._tapTest.failureAllowed = true
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* async/await delay method
|
* async/await delay method
|
||||||
*/
|
*/
|
||||||
public async delayFor(timeMilliArg: number) {
|
async delayFor (timeMilliArg) {
|
||||||
await plugins.smartdelay.delayFor(timeMilliArg);
|
await plugins.smartdelay.delayFor(timeMilliArg)
|
||||||
}
|
}
|
||||||
|
|
||||||
public async delayForRandom(timeMilliMinArg: number, timeMilliMaxArg: number) {
|
async timeout (timeMilliArg: number) {
|
||||||
await plugins.smartdelay.delayForRandom(timeMilliMinArg, timeMilliMaxArg);
|
let timeout = new plugins.smartdelay.Timeout(timeMilliArg)
|
||||||
}
|
timeout.makeUnrefed()
|
||||||
|
await timeout.promise
|
||||||
public async timeout(timeMilliArg: number) {
|
|
||||||
const timeout = new plugins.smartdelay.Timeout(timeMilliArg);
|
|
||||||
timeout.makeUnrefed();
|
|
||||||
await timeout.promise;
|
|
||||||
if (this._tapTest.status === 'pending') {
|
if (this._tapTest.status === 'pending') {
|
||||||
this._tapTest.status = 'timeout';
|
this._tapTest.status = 'timeout'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async returnError(throwingFuncArg: IPromiseFunc) {
|
|
||||||
let funcErr: Error;
|
|
||||||
try {
|
|
||||||
await throwingFuncArg();
|
|
||||||
} catch (err: any) {
|
|
||||||
funcErr = err;
|
|
||||||
}
|
|
||||||
return funcErr;
|
|
||||||
}
|
|
||||||
|
|
||||||
public defer() {
|
|
||||||
return plugins.smartpromise.defer();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,24 @@
|
|||||||
import * as plugins from './tapbundle.plugins';
|
import * as plugins from './tapbundle.plugins'
|
||||||
|
|
||||||
export interface ITapWrapOptions {
|
export interface ITapWrapFunction {
|
||||||
before: () => Promise<any>;
|
(): Promise<any>
|
||||||
after: () => {};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TapWrap {
|
export class TapWrap {
|
||||||
public options: ITapWrapOptions;
|
wrapFunction: ITapWrapFunction
|
||||||
constructor(optionsArg: ITapWrapOptions) {
|
|
||||||
this.options = optionsArg;
|
/**
|
||||||
|
* the constructor
|
||||||
|
*/
|
||||||
|
constructor (wrapFunctionArg: ITapWrapFunction) {
|
||||||
|
// nothing here
|
||||||
|
this.wrapFunction = wrapFunctionArg
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* run the wrapFunction
|
||||||
|
*/
|
||||||
|
async run () {
|
||||||
|
await this.wrapFunction()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
// pushrocks
|
import 'typings-global'
|
||||||
import * as smartdelay from '@pushrocks/smartdelay';
|
import * as early from 'early'
|
||||||
import * as smartenv from '@pushrocks/smartenv';
|
import * as leakage from 'leakage'
|
||||||
import * as smartexpect from '@pushrocks/smartexpect';
|
import * as smartdelay from 'smartdelay'
|
||||||
import * as smartpromise from '@pushrocks/smartpromise';
|
import * as smartq from 'smartq'
|
||||||
|
|
||||||
export { smartdelay, smartenv, smartexpect, smartpromise };
|
export {
|
||||||
|
early,
|
||||||
|
smartdelay,
|
||||||
|
smartq,
|
||||||
|
leakage
|
||||||
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import * as plugins from './tapbundle.plugins';
|
import * as plugins from './tapbundle.plugins'
|
||||||
|
|
||||||
export class TapCreator {
|
export class TapCreator {
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
export let tapCreator = new TapCreator();
|
export let tapCreator = new TapCreator()
|
@ -1,25 +0,0 @@
|
|||||||
import * as plugins from './tapbundle.plugins';
|
|
||||||
import type { fixture, html } from '@open-wc/testing-helpers';
|
|
||||||
import { tap } from './tapbundle.classes.tap';
|
|
||||||
|
|
||||||
class WebHelpers {
|
|
||||||
html: typeof html;
|
|
||||||
fixture: typeof fixture;
|
|
||||||
|
|
||||||
constructor() {
|
|
||||||
const smartenv = new plugins.smartenv.Smartenv();
|
|
||||||
if(smartenv.isBrowser) {
|
|
||||||
this.enable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public enable() {
|
|
||||||
tap.preTask('enable webhelpers', async () => {
|
|
||||||
const webhelpers = await import('@open-wc/testing-helpers')
|
|
||||||
this.html = webhelpers.html;
|
|
||||||
this.fixture = webhelpers.fixture;
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export const webhelpers = new WebHelpers();
|
|
16
tslint.json
16
tslint.json
@ -1,17 +1,3 @@
|
|||||||
{
|
{
|
||||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
"extends": "tslint-config-standard"
|
||||||
"rules": {
|
|
||||||
"semicolon": [true, "always"],
|
|
||||||
"no-console": false,
|
|
||||||
"ordered-imports": false,
|
|
||||||
"object-literal-sort-keys": false,
|
|
||||||
"member-ordering": {
|
|
||||||
"options":{
|
|
||||||
"order": [
|
|
||||||
"static-method"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"defaultSeverity": "warning"
|
|
||||||
}
|
}
|
||||||
|
385
yarn.lock
Normal file
385
yarn.lock
Normal file
@ -0,0 +1,385 @@
|
|||||||
|
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||||
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
|
"@types/chai-as-promised@0.0.29":
|
||||||
|
version "0.0.29"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-0.0.29.tgz#43d52892aa998e185a3de3e2477edb8573be1d77"
|
||||||
|
dependencies:
|
||||||
|
"@types/chai" "*"
|
||||||
|
"@types/promises-a-plus" "*"
|
||||||
|
|
||||||
|
"@types/chai-string@^1.1.30":
|
||||||
|
version "1.1.30"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/chai-string/-/chai-string-1.1.30.tgz#4d8744b31a5a2295fc01c981ed1e2d4c8a070f0a"
|
||||||
|
dependencies:
|
||||||
|
"@types/chai" "*"
|
||||||
|
|
||||||
|
"@types/chai@*":
|
||||||
|
version "4.0.1"
|
||||||
|
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@*":
|
||||||
|
version "0.0.27"
|
||||||
|
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:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
|
||||||
|
|
||||||
|
balanced-match@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
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:
|
||||||
|
version "1.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11"
|
||||||
|
|
||||||
|
brace-expansion@^1.1.7:
|
||||||
|
version "1.1.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
|
||||||
|
dependencies:
|
||||||
|
balanced-match "^1.0.0"
|
||||||
|
concat-map "0.0.1"
|
||||||
|
|
||||||
|
chai-as-promised@^6.0.0:
|
||||||
|
version "6.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-6.0.0.tgz#1a02a433a6f24dafac63b9c96fa1684db1aa8da6"
|
||||||
|
dependencies:
|
||||||
|
check-error "^1.0.2"
|
||||||
|
|
||||||
|
chai-string@^1.3.0:
|
||||||
|
version "1.4.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.4.0.tgz#359140c051d36a4e4b1a5fc6b910152f438a8d49"
|
||||||
|
|
||||||
|
chai@^3.5.0:
|
||||||
|
version "3.5.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"
|
||||||
|
dependencies:
|
||||||
|
assertion-error "^1.0.1"
|
||||||
|
deep-eql "^0.1.3"
|
||||||
|
type-detect "^1.0.0"
|
||||||
|
|
||||||
|
check-error@^1.0.2:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
|
||||||
|
|
||||||
|
concat-map@0.0.1:
|
||||||
|
version "0.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||||
|
|
||||||
|
deep-eql@^0.1.3:
|
||||||
|
version "0.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2"
|
||||||
|
dependencies:
|
||||||
|
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:
|
||||||
|
version "1.0.0"
|
||||||
|
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:
|
||||||
|
version "7.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
|
||||||
|
dependencies:
|
||||||
|
fs.realpath "^1.0.0"
|
||||||
|
inflight "^1.0.4"
|
||||||
|
inherits "2"
|
||||||
|
minimatch "^3.0.4"
|
||||||
|
once "^1.3.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:
|
||||||
|
version "1.0.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||||
|
dependencies:
|
||||||
|
once "^1.3.0"
|
||||||
|
wrappy "1"
|
||||||
|
|
||||||
|
inherits@2:
|
||||||
|
version "2.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
||||||
|
|
||||||
|
interpret@^1.0.0:
|
||||||
|
version "1.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90"
|
||||||
|
|
||||||
|
is-callable@^1.1.1, is-callable@^1.1.3:
|
||||||
|
version "1.1.3"
|
||||||
|
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:
|
||||||
|
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"
|
||||||
|
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.4:
|
||||||
|
version "3.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
||||||
|
dependencies:
|
||||||
|
brace-expansion "^1.1.7"
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
|
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:
|
||||||
|
version "1.4.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||||
|
dependencies:
|
||||||
|
wrappy "1"
|
||||||
|
|
||||||
|
path-is-absolute@^1.0.0:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||||
|
|
||||||
|
path-parse@^1.0.5:
|
||||||
|
version "1.0.5"
|
||||||
|
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:
|
||||||
|
version "0.6.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
|
||||||
|
dependencies:
|
||||||
|
resolve "^1.1.6"
|
||||||
|
|
||||||
|
resolve@^1.1.6:
|
||||||
|
version "1.3.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5"
|
||||||
|
dependencies:
|
||||||
|
path-parse "^1.0.5"
|
||||||
|
|
||||||
|
semver@^5.3.0:
|
||||||
|
version "5.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
|
||||||
|
|
||||||
|
shelljs@^0.7.8:
|
||||||
|
version "0.7.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
|
||||||
|
dependencies:
|
||||||
|
glob "^7.0.0"
|
||||||
|
interpret "^1.0.0"
|
||||||
|
rechoir "^0.6.2"
|
||||||
|
|
||||||
|
smartchai@^1.0.3:
|
||||||
|
version "1.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartchai/-/smartchai-1.0.3.tgz#de6d010bb8b5aef24cb70b31a5f5334e8c41b72f"
|
||||||
|
dependencies:
|
||||||
|
"@types/chai" "^3.4.35"
|
||||||
|
"@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.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:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.1.tgz#efb358705260d41ae18aef7ffd815f7b6fe17dd3"
|
||||||
|
dependencies:
|
||||||
|
typed-promisify "^0.3.0"
|
||||||
|
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:
|
||||||
|
version "0.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822"
|
||||||
|
|
||||||
|
type-detect@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
|
||||||
|
|
||||||
|
typed-promisify@^0.3.0:
|
||||||
|
version "0.3.0"
|
||||||
|
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.19:
|
||||||
|
version "1.0.19"
|
||||||
|
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.19.tgz#3376a72d4de1e5541bf5702248ff64c3e6ea316c"
|
||||||
|
dependencies:
|
||||||
|
semver "^5.3.0"
|
||||||
|
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:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
Reference in New Issue
Block a user