Compare commits
124 Commits
Author | SHA1 | Date | |
---|---|---|---|
c89362ba8a | |||
f07879d2c1 | |||
eba3a19488 | |||
f83479a407 | |||
da711c119f | |||
6690238251 | |||
27a794b83c | |||
b3c4a58491 | |||
50c34f89ee | |||
b813453c5f | |||
9a6dc33b6b | |||
8bf99ae7ec | |||
cc708b29ae | |||
5798d3e808 | |||
37fe299a45 | |||
e24cdd9f0f | |||
ae7aaab456 | |||
bab360cc59 | |||
36dcd228fd | |||
c7d6451758 | |||
aeedf14336 | |||
14b95cfbc3 | |||
0884da7941 | |||
22df58b8bc | |||
33399126f7 | |||
d1e46fd2a7 | |||
9304e6d736 | |||
588c532d6d | |||
e3a756c775 | |||
05defe6031 | |||
f4bb17dea1 | |||
1023a94ff2 | |||
8ee456da5f | |||
45ee6eca31 | |||
1eaf1e9a77 | |||
715108b11b | |||
7b1e8f47b1 | |||
2b71ffe8c2 | |||
29ec99e63e | |||
50f1aad895 | |||
f7e95df2b9 | |||
a00536996c | |||
66f49cf8aa | |||
aa3f1eb21f | |||
d81a8006b1 | |||
5fa4c1cd85 | |||
fc609858ff | |||
19ecca0179 | |||
ff55e596cb | |||
ed8c8312c2 | |||
a6dd8de0db | |||
081347b23b | |||
f23575a8a2 | |||
b2dbc9160b | |||
1e8ab2d7a2 | |||
427878763e | |||
bdcc94e723 | |||
3ac46b2363 | |||
deae532820 | |||
99883eab82 | |||
e27e59bbeb | |||
fa54431280 | |||
aa7c49548c | |||
8d5352d000 | |||
c3ae0bc211 | |||
0381f63b65 | |||
f1441bf123 | |||
9892085140 | |||
b6d1c3c083 | |||
6e6cfbadbd | |||
02ff220c59 | |||
035cb84442 | |||
505f624dd9 | |||
ea5fbd4637 | |||
de780538a5 | |||
28b1f0bfed | |||
72b72a9ffb | |||
be393199be | |||
7b6260bb15 | |||
2345e972d5 | |||
22c44a8cd0 | |||
bae2aebf83 | |||
5fe2358bfe | |||
280ded573d | |||
6b6a92b709 | |||
c1589c2309 | |||
271d657f2c | |||
63669ea6ff | |||
4306272f45 | |||
4378b36069 | |||
e8f7013435 | |||
3199943b59 | |||
0028c5492b | |||
e3b05cc43c | |||
f68da622d7 | |||
b7e57e8cdc | |||
93b46a1446 | |||
ca3ea788fd | |||
94a1bd4839 | |||
6c960f9fbd | |||
f2eddb169f | |||
ad2da38289 | |||
301b82a0fb | |||
d28609b513 | |||
d82d4e2eae | |||
d105bab740 | |||
a03bcf4583 | |||
2b21566fe1 | |||
d22fc1b688 | |||
15bbf7f10c | |||
c5e068d5cd | |||
95fa33df58 | |||
42933e6bb0 | |||
5010e882f6 | |||
055d36c74e | |||
e2ac035997 | |||
ec0d6004d5 | |||
3bbca9b0b4 | |||
f16e25b413 | |||
36574d0f34 | |||
12ac28ba44 | |||
1c80c25b14 | |||
03614fe2ef | |||
8be85e1b35 |
18
.gitignore
vendored
18
.gitignore
vendored
@ -1,4 +1,20 @@
|
||||
node_modules/
|
||||
.nogit/
|
||||
|
||||
# artifacts
|
||||
coverage/
|
||||
public/
|
||||
pages/
|
||||
|
||||
# installs
|
||||
node_modules/
|
||||
|
||||
# caches
|
||||
.yarn/
|
||||
.cache/
|
||||
.rpt2_cache
|
||||
|
||||
# builds
|
||||
dist/
|
||||
dist_*/
|
||||
|
||||
# custom
|
112
.gitlab-ci.yml
112
.gitlab-ci.yml
@ -1,38 +1,76 @@
|
||||
# gitzone standard
|
||||
image: hosttoday/ht-docker-node:npmci
|
||||
# gitzone ci_default
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .yarn/
|
||||
key: "$CI_BUILD_STAGE"
|
||||
- .npmci_cache/
|
||||
key: '$CI_BUILD_STAGE'
|
||||
|
||||
stages:
|
||||
- test
|
||||
- release
|
||||
- trigger
|
||||
- pages
|
||||
- security
|
||||
- test
|
||||
- release
|
||||
- metadata
|
||||
|
||||
testLEGACY:
|
||||
stage: test
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
mirror:
|
||||
stage: security
|
||||
script:
|
||||
- npmci test legacy
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
- npmci git mirror
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
auditProductionDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install --production --ignore-scripts
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command npm audit --audit-level=high --only=prod --production
|
||||
tags:
|
||||
- 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
|
||||
|
||||
testLTS:
|
||||
# ====================
|
||||
# test stage
|
||||
# ====================
|
||||
|
||||
testStable:
|
||||
stage: test
|
||||
script:
|
||||
- npmci test lts
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
|
||||
testSTABLE:
|
||||
testBuild:
|
||||
stage: test
|
||||
script:
|
||||
- npmci test stable
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci command npm run build
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
@ -40,32 +78,60 @@ testSTABLE:
|
||||
release:
|
||||
stage: release
|
||||
script:
|
||||
- npmci publish
|
||||
- npmci node install stable
|
||||
- npmci npm publish
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- 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:
|
||||
stage: trigger
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci trigger
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
pages:
|
||||
image: hosttoday/ht-docker-node:npmci
|
||||
stage: pages
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci command yarn global add npmpage
|
||||
- npmci command npmpage --publish gitlab
|
||||
- npmci node install lts
|
||||
- npmci command npm install -g @gitzone/tsdoc
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command tsdoc
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
only:
|
||||
- tags
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
paths:
|
||||
- public
|
||||
- public
|
||||
allow_failure: true
|
||||
|
29
.vscode/launch.json
vendored
Normal file
29
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"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
Normal file
26
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"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
26
README.md
@ -1,26 +0,0 @@
|
||||
# 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)
|
4
dist/index.d.ts
vendored
4
dist/index.d.ts
vendored
@ -1,4 +0,0 @@
|
||||
import 'typings-global';
|
||||
import { expect } from 'smartchai';
|
||||
import { tap } from './tapbundle.tap';
|
||||
export { tap, expect };
|
8
dist/index.js
vendored
8
dist/index.js
vendored
@ -1,8 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
require("typings-global");
|
||||
const smartchai_1 = require("smartchai");
|
||||
exports.expect = smartchai_1.expect;
|
||||
const tapbundle_tap_1 = require("./tapbundle.tap");
|
||||
exports.tap = tapbundle_tap_1.tap;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2Qix5Q0FBa0M7QUFNaEMsaUJBTk8sa0JBQU0sQ0FNUDtBQUxSLG1EQUFxQztBQUluQyxjQUpPLG1CQUFHLENBSVAifQ==
|
5
dist/tapbundle.plugins.d.ts
vendored
5
dist/tapbundle.plugins.d.ts
vendored
@ -1,5 +0,0 @@
|
||||
import 'typings-global';
|
||||
import * as early from 'early';
|
||||
import * as leakage from 'leakage';
|
||||
import * as smartq from 'smartq';
|
||||
export { early, smartq, leakage };
|
10
dist/tapbundle.plugins.js
vendored
10
dist/tapbundle.plugins.js
vendored
@ -1,10 +0,0 @@
|
||||
"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 smartq = require("smartq");
|
||||
exports.smartq = smartq;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy90YXBidW5kbGUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2QiwrQkFBOEI7QUFLNUIsc0JBQUs7QUFKUCxtQ0FBa0M7QUFNaEMsMEJBQU87QUFMVCxpQ0FBZ0M7QUFJOUIsd0JBQU0ifQ==
|
54
dist/tapbundle.tap.d.ts
vendored
54
dist/tapbundle.tap.d.ts
vendored
@ -1,54 +0,0 @@
|
||||
import { HrtMeasurement } from 'early';
|
||||
export declare type TTestStatus = 'success' | 'error' | 'pending' | 'errorAfterSuccess';
|
||||
export interface ITestFunction {
|
||||
(): Promise<any>;
|
||||
}
|
||||
export declare class TapTest {
|
||||
description: string;
|
||||
parallel: boolean;
|
||||
hrtMeasurement: HrtMeasurement;
|
||||
testFunction: ITestFunction;
|
||||
status: TTestStatus;
|
||||
/**
|
||||
* constructor
|
||||
*/
|
||||
constructor(optionsArg: {
|
||||
description: string;
|
||||
testFunction: ITestFunction;
|
||||
parallel: boolean;
|
||||
});
|
||||
/**
|
||||
* run the test
|
||||
*/
|
||||
run(testKeyArg: number): Promise<void>;
|
||||
}
|
||||
export declare class Tap {
|
||||
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<void>;
|
||||
/**
|
||||
* 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;
|
120
dist/tapbundle.tap.js
vendored
120
dist/tapbundle.tap.js
vendored
@ -1,120 +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 });
|
||||
// imported interfaces
|
||||
const early_1 = require("early");
|
||||
class TapTest {
|
||||
/**
|
||||
* constructor
|
||||
*/
|
||||
constructor(optionsArg) {
|
||||
this.description = optionsArg.description;
|
||||
this.testFunction = optionsArg.testFunction;
|
||||
this.parallel = optionsArg.parallel;
|
||||
this.status = 'pending';
|
||||
this.hrtMeasurement = new early_1.HrtMeasurement();
|
||||
}
|
||||
/**
|
||||
* run the test
|
||||
*/
|
||||
run(testKeyArg) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
this.hrtMeasurement.start();
|
||||
try {
|
||||
yield this.testFunction();
|
||||
this.hrtMeasurement.stop();
|
||||
console.log(`ok ${testKeyArg + 1} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms`);
|
||||
this.status = 'success';
|
||||
}
|
||||
catch (err) {
|
||||
this.hrtMeasurement.stop();
|
||||
console.log(`not ok ${testKeyArg + 1} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms`);
|
||||
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);
|
||||
}
|
||||
}
|
||||
exports.Tap = Tap;
|
||||
exports.tap = new Tap();
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLnRhcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3RhcGJ1bmRsZS50YXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUlBLHNCQUFzQjtBQUN0QixpQ0FBc0M7QUFVdEM7SUFPRTs7T0FFRztJQUNILFlBQWEsVUFJWjtRQUNDLElBQUksQ0FBQyxXQUFXLEdBQUcsVUFBVSxDQUFDLFdBQVcsQ0FBQTtRQUN6QyxJQUFJLENBQUMsWUFBWSxHQUFHLFVBQVUsQ0FBQyxZQUFZLENBQUE7UUFDM0MsSUFBSSxDQUFDLFFBQVEsR0FBRyxVQUFVLENBQUMsUUFBUSxDQUFBO1FBQ25DLElBQUksQ0FBQyxNQUFNLEdBQUcsU0FBUyxDQUFBO1FBQ3ZCLElBQUksQ0FBQyxjQUFjLEdBQUcsSUFBSSxzQkFBYyxFQUFFLENBQUE7SUFDNUMsQ0FBQztJQUVEOztPQUVHO0lBQ0csR0FBRyxDQUFFLFVBQWtCOztZQUMzQixJQUFJLENBQUMsY0FBYyxDQUFDLEtBQUssRUFBRSxDQUFBO1lBQzNCLElBQUksQ0FBQztnQkFDSCxNQUFNLElBQUksQ0FBQyxZQUFZLEVBQUUsQ0FBQTtnQkFDekIsSUFBSSxDQUFDLGNBQWMsQ0FBQyxJQUFJLEVBQUUsQ0FBQTtnQkFDMUIsT0FBTyxDQUFDLEdBQUcsQ0FBQyxNQUFNLFVBQVUsR0FBRyxDQUFDLE1BQU0sSUFBSSxDQUFDLFdBQVcsV0FBVyxJQUFJLENBQUMsY0FBYyxDQUFDLFlBQVksSUFBSSxDQUFDLENBQUE7Z0JBQ3RHLElBQUksQ0FBQyxNQUFNLEdBQUcsU0FBUyxDQUFBO1lBQ3pCLENBQUM7WUFBQyxLQUFLLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDO2dCQUNiLElBQUksQ0FBQyxjQUFjLENBQUMsSUFBSSxFQUFFLENBQUE7Z0JBQzFCLE9BQU8sQ0FBQyxHQUFHLENBQUMsVUFBVSxVQUFVLEdBQUcsQ0FBQyxNQUFNLElBQUksQ0FBQyxXQUFXLFdBQVcsSUFBSSxDQUFDLGNBQWMsQ0FBQyxZQUFZLElBQUksQ0FBQyxDQUFBO2dCQUMxRyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsTUFBTSxLQUFLLFNBQVMsQ0FBQyxDQUFDLENBQUM7b0JBQzlCLElBQUksQ0FBQyxNQUFNLEdBQUcsbUJBQW1CLENBQUE7b0JBQ2pDLE9BQU8sQ0FBQyxHQUFHLENBQUMseUVBQXlFLENBQUMsQ0FBQTtnQkFDeEYsQ0FBQztnQkFDRCxPQUFPLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxDQUFBO1lBQ2xCLENBQUM7UUFDSCxDQUFDO0tBQUE7Q0FDRjtBQTFDRCwwQkEwQ0M7QUFFRDtJQUFBO1FBQ1UsV0FBTSxHQUFjLEVBQUUsQ0FBQTtJQW9FaEMsQ0FBQztJQWxFQzs7OztPQUlHO0lBQ0csSUFBSSxDQUFFLGVBQXVCLEVBQUUsWUFBMkI7O1lBQzlELElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLElBQUksT0FBTyxDQUFDO2dCQUMzQixXQUFXLEVBQUUsZUFBZTtnQkFDNUIsWUFBWSxFQUFFLFlBQVk7Z0JBQzFCLFFBQVEsRUFBRSxLQUFLO2FBQ2hCLENBQUMsQ0FBQyxDQUFBO1FBQ0wsQ0FBQztLQUFBO0lBRUQ7Ozs7T0FJRztJQUNILFlBQVksQ0FBRSxlQUF1QixFQUFFLFlBQTJCO1FBQ2hFLElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLElBQUksT0FBTyxDQUFDO1lBQzNCLFdBQVcsRUFBRSxlQUFlO1lBQzVCLFlBQVksRUFBRSxZQUFZO1lBQzFCLFFBQVEsRUFBRSxJQUFJO1NBQ2YsQ0FBQyxDQUFDLENBQUE7SUFDTCxDQUFDO0lBRUQ7Ozs7T0FJRztJQUNILFdBQVcsQ0FBRSxlQUF1QixFQUFFLFlBQTJCO0lBRWpFLENBQUM7SUFFRDs7T0FFRztJQUNHLEtBQUs7O1lBQ1QsSUFBSSxZQUFZLEdBQW1CLEVBQUUsQ0FBQTtZQUVyQyxxQ0FBcUM7WUFDckMsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQztnQkFDN0IsT0FBTyxDQUFDLEdBQUcsQ0FBQyxrQ0FBa0MsQ0FBQyxDQUFBO2dCQUMvQyxNQUFNLENBQUE7WUFDUixDQUFDO1lBRUQsT0FBTyxDQUFDLEdBQUcsQ0FBQyxNQUFNLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQTtZQUN2QyxHQUFHLENBQUMsQ0FBQyxJQUFJLE9BQU8sR0FBRyxDQUFDLEVBQUUsT0FBTyxHQUFHLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxFQUFFLE9BQU8sRUFBRSxFQUFFLENBQUM7Z0JBQzlELElBQUksV0FBVyxHQUFHLElBQUksQ0FBQyxNQUFNLENBQUMsT0FBTyxDQUFDLENBQUE7Z0JBQ3RDLElBQUksV0FBVyxHQUFHLFdBQVcsQ0FBQyxHQUFHLENBQUMsT0FBTyxDQUFDLENBQUE7Z0JBQzFDLEVBQUUsQ0FBQyxDQUFDLFdBQVcsQ0FBQyxRQUFRLENBQUMsQ0FBQyxDQUFDO29CQUN6QixZQUFZLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxDQUFBO2dCQUNoQyxDQUFDO2dCQUFDLElBQUksQ0FBQyxDQUFDO29CQUNOLE1BQU0sV0FBVyxDQUFBO2dCQUNuQixDQUFDO1lBQ0gsQ0FBQztZQUNELE1BQU0sT0FBTyxDQUFDLEdBQUcsQ0FBQyxZQUFZLENBQUMsQ0FBQTtRQUNqQyxDQUFDO0tBQUE7SUFFRDs7T0FFRztJQUNILEtBQUssQ0FBRSxHQUFHO1FBQ1IsT0FBTyxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsQ0FBQTtJQUNsQixDQUFDO0NBQ0Y7QUFyRUQsa0JBcUVDO0FBRVUsUUFBQSxHQUFHLEdBQUcsSUFBSSxHQUFHLEVBQUUsQ0FBQSJ9
|
3
dist/tapbundle.tapcreator.d.ts
vendored
3
dist/tapbundle.tapcreator.d.ts
vendored
@ -1,3 +0,0 @@
|
||||
export declare class TapCreator {
|
||||
}
|
||||
export declare let tapCreator: TapCreator;
|
7
dist/tapbundle.tapcreator.js
vendored
7
dist/tapbundle.tapcreator.js
vendored
@ -1,7 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
class TapCreator {
|
||||
}
|
||||
exports.TapCreator = TapCreator;
|
||||
exports.tapCreator = new TapCreator();
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFwYnVuZGxlLnRhcGNyZWF0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy90YXBidW5kbGUudGFwY3JlYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUVBO0NBRUM7QUFGRCxnQ0FFQztBQUVVLFFBQUEsVUFBVSxHQUFHLElBQUksVUFBVSxFQUFFLENBQUEifQ==
|
@ -1,42 +0,0 @@
|
||||
# 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.
|
||||
|
||||
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.
|
||||
|
||||
> 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
Normal file
22
license
Normal file
@ -0,0 +1,22 @@
|
||||
**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,7 +1,22 @@
|
||||
{
|
||||
"npmci": {
|
||||
"globalNpmTools": [
|
||||
"npmts"
|
||||
]
|
||||
"npmGlobalTools": [],
|
||||
"npmAccessLevel": "public"
|
||||
},
|
||||
"npmts": {
|
||||
"testConfig": {
|
||||
"parallel": false
|
||||
}
|
||||
},
|
||||
"gitzone": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "pushrocks",
|
||||
"gitrepo": "tapbundle",
|
||||
"shortDescription": "tap bundled for tapbuffer",
|
||||
"npmPackagename": "@pushrocks/tapbundle",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
}
|
19064
package-lock.json
generated
Normal file
19064
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
50
package.json
50
package.json
@ -1,11 +1,14 @@
|
||||
{
|
||||
"name": "tapbundle",
|
||||
"version": "1.0.9",
|
||||
"name": "@pushrocks/tapbundle",
|
||||
"private": false,
|
||||
"version": "5.0.1",
|
||||
"description": "tap bundled for tapbuffer",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "(npmts)"
|
||||
"test": "(tstest test/)",
|
||||
"build": "(tsbuild --web)"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -18,10 +21,35 @@
|
||||
},
|
||||
"homepage": "https://gitlab.com/pushrocks/tapbundle#README",
|
||||
"dependencies": {
|
||||
"early": "^2.1.1",
|
||||
"leakage": "^0.2.0",
|
||||
"smartchai": "^1.0.3",
|
||||
"smartq": "^1.1.1",
|
||||
"typings-global": "^1.0.16"
|
||||
}
|
||||
"@open-wc/testing-helpers": "^2.1.2",
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartenv": "^4.0.16",
|
||||
"@pushrocks/smartexpect": "^1.0.12",
|
||||
"@pushrocks/smartpromise": "^3.1.7",
|
||||
"@pushrocks/smarttime": "^3.0.45"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.48",
|
||||
"@gitzone/tsrun": "^1.2.31",
|
||||
"@gitzone/tstest": "^1.0.66",
|
||||
"@types/node": "^17.0.18",
|
||||
"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"
|
||||
]
|
||||
}
|
||||
|
88
readme.md
Normal file
88
readme.md
Normal file
@ -0,0 +1,88 @@
|
||||
# @pushrocks/tapbundle
|
||||
tap based testing framework for use with @gitzone/tstest
|
||||
|
||||
## 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
|
||||
* `expect` and `expectAsync` from the package `@pushrocks/smartexpect`
|
||||
|
||||
### A few words on tap
|
||||
|
||||
**"tap"** stands for **"test anything protocol"**. Its programming language agnostic as long as the test interpreter can read the tap console output. This package is optimized to work with @gitzone/tstest as interpreter, which offers different V8 based runtime environments like nodejs, chrome, and deno.
|
||||
|
||||
### Write your first tests
|
||||
|
||||
```typescript
|
||||
import { tap, expect, expectAsync } 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
|
||||
});
|
||||
|
||||
const 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).toBeTrue(); // will not throw
|
||||
await expectAsync(tools.delayFor(2000)).toBeUndefined(); // yay expect promises :)
|
||||
expectAsync(myTest2.promise) // access other tests metadata :)
|
||||
.property('hrtMeasurement') // and drill down into properties
|
||||
.property('milliSeconds').toBeGreaterThan(1000);
|
||||
});
|
||||
|
||||
const 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).toEqual('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)
|
45
test/test.browser.nonci.ts
Normal file
45
test/test.browser.nonci.ts
Normal file
@ -0,0 +1,45 @@
|
||||
import { tap, expect, webhelpers } from '../ts/index.js';
|
||||
|
||||
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();
|
5
test/test.tapwrap.ts
Normal file
5
test/test.tapwrap.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { tap, expect, TapWrap } from '../ts/index.js';
|
||||
|
||||
tap.test('should run a test', async () => {});
|
||||
|
||||
tap.start();
|
47
test/test.ts
47
test/test.ts
@ -1,7 +1,44 @@
|
||||
import { tap, expect } from '../dist/index'
|
||||
import { tap, expect } from '../ts/index.js';
|
||||
|
||||
tap.test('my first test', async () => {
|
||||
return expect(true).to.be.true
|
||||
})
|
||||
tap.preTask('hi there', async () => {
|
||||
console.log('this is a pretask');
|
||||
});
|
||||
|
||||
tap.start()
|
||||
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(1000);
|
||||
});
|
||||
|
||||
const test3 = tap.test(
|
||||
'my third test -> test2 should take longer than test1 and endure at least 1000ms',
|
||||
async () => {
|
||||
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) => {
|
||||
tools.allowFailure();
|
||||
expect(false).toBeFalse();
|
||||
return 'hello';
|
||||
});
|
||||
|
||||
const test5 = tap.test('my 5th test -> should pass in about 500ms', async (tools) => {
|
||||
const test4Result = await test4.testResultPromise;
|
||||
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(2000);
|
||||
});
|
||||
|
||||
tap.start();
|
||||
|
11
ts/index.ts
11
ts/index.ts
@ -1,9 +1,10 @@
|
||||
import 'typings-global'
|
||||
import { expect } from 'smartchai'
|
||||
import { tap } from './tapbundle.tap'
|
||||
export { tap } from './tapbundle.classes.tap.js';
|
||||
export { TapWrap } from './tapbundle.classes.tapwrap.js';
|
||||
export { webhelpers } from './webhelpers.js';
|
||||
|
||||
import { expect, expectAsync } from '@pushrocks/smartexpect';
|
||||
|
||||
export {
|
||||
tap,
|
||||
expect
|
||||
expect,
|
||||
expectAsync
|
||||
}
|
21
ts/tapbundle.classes.pretask.ts
Normal file
21
ts/tapbundle.classes.pretask.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import * as plugins from './tapbundle.plugins.js';
|
||||
import { TapTools } from './tapbundle.classes.taptools.js';
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
154
ts/tapbundle.classes.tap.ts
Normal file
154
ts/tapbundle.classes.tap.ts
Normal file
@ -0,0 +1,154 @@
|
||||
import * as plugins from './tapbundle.plugins.js';
|
||||
|
||||
import { IPreTaskFunction, PreTask } from './tapbundle.classes.pretask.js';
|
||||
import { TapTest, ITestFunction } from './tapbundle.classes.taptest.js';
|
||||
export class Tap <T> {
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
public only = {
|
||||
test: (descriptionArg: string, testFunctionArg: ITestFunction<T>) => {
|
||||
this.test(descriptionArg, testFunctionArg, 'only');
|
||||
},
|
||||
};
|
||||
|
||||
private _tapPreTasks: PreTask[] = [];
|
||||
private _tapTests: TapTest<any>[] = [];
|
||||
private _tapTestsOnly: TapTest<any>[] = [];
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
public test(
|
||||
testDescription: string,
|
||||
testFunction: ITestFunction<T>,
|
||||
modeArg: 'normal' | 'only' | 'skip' = 'normal'
|
||||
): TapTest<T> {
|
||||
const localTest = new TapTest<T>({
|
||||
description: testDescription,
|
||||
testFunction,
|
||||
parallel: false,
|
||||
});
|
||||
if (modeArg === 'normal') {
|
||||
this._tapTests.push(localTest);
|
||||
} else if (modeArg === 'only') {
|
||||
this._tapTestsOnly.push(localTest);
|
||||
}
|
||||
return localTest;
|
||||
}
|
||||
|
||||
public preTask(descriptionArg: string, functionArg: IPreTaskFunction) {
|
||||
this._tapPreTasks.push(new PreTask(descriptionArg, 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
|
||||
*/
|
||||
public testParallel(testDescription: string, testFunction: ITestFunction<T>) {
|
||||
this._tapTests.push(
|
||||
new TapTest({
|
||||
description: testDescription,
|
||||
testFunction,
|
||||
parallel: true,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* starts the test evaluation
|
||||
*/
|
||||
public async start(optionsArg?: { throwOnError: boolean }) {
|
||||
// lets set the tapbundle promise
|
||||
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
|
||||
if (this._tapTests.length === 0) {
|
||||
console.log('no tests specified. Ending here!');
|
||||
// TODO: throw proper error
|
||||
return;
|
||||
}
|
||||
|
||||
// determine which tests to run
|
||||
let concerningTests: TapTest[];
|
||||
if (this._tapTestsOnly.length > 0) {
|
||||
concerningTests = this._tapTestsOnly;
|
||||
} 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) {
|
||||
promiseArray.push(testPromise);
|
||||
} else {
|
||||
await testPromise;
|
||||
}
|
||||
}
|
||||
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
|
||||
*/
|
||||
public threw(err: Error) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
|
||||
export let tap = new Tap();
|
81
ts/tapbundle.classes.taptest.ts
Normal file
81
ts/tapbundle.classes.taptest.ts
Normal file
@ -0,0 +1,81 @@
|
||||
import * as plugins from './tapbundle.plugins.js';
|
||||
import { tapCreator } from './tapbundle.tapcreator.js';
|
||||
import { TapTools } from './tapbundle.classes.taptools.js';
|
||||
|
||||
// imported interfaces
|
||||
import { Deferred } from '@pushrocks/smartpromise';
|
||||
import { HrtMeasurement } from '@pushrocks/smarttime';
|
||||
|
||||
// interfaces
|
||||
export type TTestStatus = 'success' | 'error' | 'pending' | 'errorAfterSuccess' | 'timeout';
|
||||
|
||||
export interface ITestFunction <T> { (tapTools?: TapTools): Promise<T> };
|
||||
|
||||
export class TapTest <T = unknown> {
|
||||
public description: string;
|
||||
public failureAllowed: boolean;
|
||||
public hrtMeasurement: HrtMeasurement;
|
||||
public parallel: boolean;
|
||||
public status: TTestStatus;
|
||||
public tapTools: TapTools;
|
||||
public testFunction: ITestFunction<T>;
|
||||
public testKey: number; // the testKey the position in the test qeue. Set upon calling .run()
|
||||
private testDeferred: Deferred<TapTest<T>> = plugins.smartpromise.defer();
|
||||
public testPromise: Promise<TapTest<T>> = this.testDeferred.promise;
|
||||
private testResultDeferred: Deferred<T> = plugins.smartpromise.defer();
|
||||
public testResultPromise: Promise<T> = this.testResultDeferred.promise;
|
||||
/**
|
||||
* constructor
|
||||
*/
|
||||
constructor(optionsArg: { description: string; testFunction: ITestFunction<T>; 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
|
||||
*/
|
||||
public async run(testKeyArg: number) {
|
||||
this.hrtMeasurement.start();
|
||||
this.testKey = testKeyArg;
|
||||
const testNumber = testKeyArg + 1;
|
||||
try {
|
||||
const testReturnValue = await this.testFunction(this.tapTools);
|
||||
if (this.status === 'timeout') {
|
||||
throw new Error('Test succeeded, but timed out...');
|
||||
}
|
||||
this.hrtMeasurement.stop();
|
||||
console.log(
|
||||
`ok ${testNumber} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms`
|
||||
);
|
||||
this.status = 'success';
|
||||
this.testDeferred.resolve(this);
|
||||
this.testResultDeferred.resolve(testReturnValue);
|
||||
} catch (err: any) {
|
||||
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 (this.status === 'success') {
|
||||
this.status = 'errorAfterSuccess';
|
||||
console.log('!!! ALERT !!!: weird behaviour, since test has been already successfull');
|
||||
} else {
|
||||
this.status = 'error';
|
||||
}
|
||||
|
||||
// if the test is allowed to fail
|
||||
if (this.failureAllowed) {
|
||||
console.log(`please note: failure allowed!`);
|
||||
}
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
}
|
58
ts/tapbundle.classes.taptools.ts
Normal file
58
ts/tapbundle.classes.taptools.ts
Normal file
@ -0,0 +1,58 @@
|
||||
import * as plugins from './tapbundle.plugins.js';
|
||||
import { TapTest } from './tapbundle.classes.taptest.js';
|
||||
|
||||
export interface IPromiseFunc {
|
||||
(): Promise<any>;
|
||||
}
|
||||
|
||||
export class TapTools {
|
||||
/**
|
||||
* the referenced TapTest
|
||||
*/
|
||||
private _tapTest: TapTest;
|
||||
|
||||
constructor(TapTestArg: TapTest<any>) {
|
||||
this._tapTest = TapTestArg;
|
||||
}
|
||||
|
||||
/**
|
||||
* allow failure
|
||||
*/
|
||||
public allowFailure() {
|
||||
this._tapTest.failureAllowed = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* async/await delay method
|
||||
*/
|
||||
public async delayFor(timeMilliArg: number) {
|
||||
await plugins.smartdelay.delayFor(timeMilliArg);
|
||||
}
|
||||
|
||||
public async delayForRandom(timeMilliMinArg: number, timeMilliMaxArg: number) {
|
||||
await plugins.smartdelay.delayForRandom(timeMilliMinArg, timeMilliMaxArg);
|
||||
}
|
||||
|
||||
public async timeout(timeMilliArg: number) {
|
||||
const timeout = new plugins.smartdelay.Timeout(timeMilliArg);
|
||||
timeout.makeUnrefed();
|
||||
await timeout.promise;
|
||||
if (this._tapTest.status === 'pending') {
|
||||
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();
|
||||
}
|
||||
}
|
13
ts/tapbundle.classes.tapwrap.ts
Normal file
13
ts/tapbundle.classes.tapwrap.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import * as plugins from './tapbundle.plugins.js';
|
||||
|
||||
export interface ITapWrapOptions {
|
||||
before: () => Promise<any>;
|
||||
after: () => {};
|
||||
}
|
||||
|
||||
export class TapWrap {
|
||||
public options: ITapWrapOptions;
|
||||
constructor(optionsArg: ITapWrapOptions) {
|
||||
this.options = optionsArg;
|
||||
}
|
||||
}
|
@ -1,10 +1,7 @@
|
||||
import 'typings-global'
|
||||
import * as early from 'early'
|
||||
import * as leakage from 'leakage'
|
||||
import * as smartq from 'smartq'
|
||||
// pushrocks
|
||||
import * as smartdelay from '@pushrocks/smartdelay';
|
||||
import * as smartenv from '@pushrocks/smartenv';
|
||||
import * as smartexpect from '@pushrocks/smartexpect';
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
|
||||
export {
|
||||
early,
|
||||
smartq,
|
||||
leakage
|
||||
}
|
||||
export { smartdelay, smartenv, smartexpect, smartpromise };
|
||||
|
@ -1,132 +0,0 @@
|
||||
import * as plugins from './tapbundle.plugins'
|
||||
|
||||
import { tapCreator } from './tapbundle.tapcreator'
|
||||
|
||||
// imported interfaces
|
||||
import { HrtMeasurement } from 'early'
|
||||
|
||||
// interfaces
|
||||
export type TTestStatus = 'success' | 'error' | 'pending' | 'errorAfterSuccess'
|
||||
|
||||
export interface ITestFunction {
|
||||
(): Promise<any>
|
||||
}
|
||||
|
||||
|
||||
export class TapTest {
|
||||
description: string
|
||||
parallel: boolean
|
||||
hrtMeasurement: HrtMeasurement
|
||||
testFunction: ITestFunction
|
||||
status: TTestStatus
|
||||
|
||||
/**
|
||||
* constructor
|
||||
*/
|
||||
constructor (optionsArg: {
|
||||
description: string,
|
||||
testFunction: ITestFunction,
|
||||
parallel: boolean
|
||||
}) {
|
||||
this.description = optionsArg.description
|
||||
this.testFunction = optionsArg.testFunction
|
||||
this.parallel = optionsArg.parallel
|
||||
this.status = 'pending'
|
||||
this.hrtMeasurement = new HrtMeasurement()
|
||||
}
|
||||
|
||||
/**
|
||||
* run the test
|
||||
*/
|
||||
async run (testKeyArg: number) {
|
||||
this.hrtMeasurement.start()
|
||||
try {
|
||||
await this.testFunction()
|
||||
this.hrtMeasurement.stop()
|
||||
console.log(`ok ${testKeyArg + 1} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms`)
|
||||
this.status = 'success'
|
||||
} catch (err) {
|
||||
this.hrtMeasurement.stop()
|
||||
console.log(`not ok ${testKeyArg + 1} - ${this.description} # time=${this.hrtMeasurement.milliSeconds}ms`)
|
||||
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[] = []
|
||||
|
||||
/**
|
||||
* Normal test function, will run one by one
|
||||
* @param testDescription - A description of what the test does
|
||||
* @param testFunction - A Function that returns a Promise and resolves or rejects
|
||||
*/
|
||||
async test (testDescription: string, testFunction: ITestFunction) {
|
||||
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: string, testFunction: ITestFunction) {
|
||||
this._tests.push(new TapTest({
|
||||
description: testDescription,
|
||||
testFunction: testFunction,
|
||||
parallel: true
|
||||
}))
|
||||
}
|
||||
|
||||
/**
|
||||
* tests leakage
|
||||
* @param testDescription - A description of what the test does
|
||||
* @param testFunction - A Function that returns a Promise and resolves or rejects
|
||||
*/
|
||||
testLeakage (testDescription: string, testFunction: ITestFunction) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* starts the test evaluation
|
||||
*/
|
||||
async start () {
|
||||
let promiseArray: Promise<any>[] = []
|
||||
|
||||
// safeguard against empty test array
|
||||
if (this._tests.length === 0) {
|
||||
console.log('no tests specified. Ending here!')
|
||||
return
|
||||
}
|
||||
|
||||
console.log(`1..${this._tests.length}`)
|
||||
for (let testKey = 0; testKey < this._tests.length; testKey++) {
|
||||
let currentTest = this._tests[testKey]
|
||||
let testPromise = currentTest.run(testKey)
|
||||
if (currentTest.parallel) {
|
||||
promiseArray.push(testPromise)
|
||||
} else {
|
||||
await testPromise
|
||||
}
|
||||
}
|
||||
await Promise.all(promiseArray)
|
||||
}
|
||||
|
||||
/**
|
||||
* handle errors
|
||||
*/
|
||||
threw (err) {
|
||||
console.log(err)
|
||||
}
|
||||
}
|
||||
|
||||
export let tap = new Tap()
|
||||
|
@ -1,7 +1,7 @@
|
||||
import * as plugins from './tapbundle.plugins'
|
||||
import * as plugins from './tapbundle.plugins.js';
|
||||
|
||||
export class TapCreator {
|
||||
|
||||
// TODO:
|
||||
}
|
||||
|
||||
export let tapCreator = new TapCreator()
|
||||
export let tapCreator = new TapCreator();
|
||||
|
25
ts/webhelpers.ts
Normal file
25
ts/webhelpers.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import * as plugins from './tapbundle.plugins.js';
|
||||
import type { fixture, html } from '@open-wc/testing-helpers';
|
||||
import { tap } from './tapbundle.classes.tap.js';
|
||||
|
||||
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,3 +1,17 @@
|
||||
{
|
||||
"extends": "tslint-config-standard"
|
||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||
"rules": {
|
||||
"semicolon": [true, "always"],
|
||||
"no-console": false,
|
||||
"ordered-imports": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"member-ordering": {
|
||||
"options":{
|
||||
"order": [
|
||||
"static-method"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultSeverity": "warning"
|
||||
}
|
||||
|
241
yarn.lock
241
yarn.lock
@ -1,241 +0,0 @@
|
||||
# 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@*", "@types/chai@^3.4.35":
|
||||
version "3.4.35"
|
||||
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.4.35.tgz#e8d65f83492d2944f816fc620741821c28a8c900"
|
||||
|
||||
"@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"
|
||||
|
||||
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@^0.4.1:
|
||||
version "0.4.2"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
|
||||
|
||||
beautycolor@^1.0.7:
|
||||
version "1.0.7"
|
||||
resolved "https://registry.yarnpkg.com/beautycolor/-/beautycolor-1.0.7.tgz#a4715738ac4c8221371e9cbeb5a6cc6d11ecbf7c"
|
||||
dependencies:
|
||||
ansi-256-colors "^1.1.0"
|
||||
typings-global "^1.0.14"
|
||||
|
||||
bindings@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11"
|
||||
|
||||
brace-expansion@^1.0.0:
|
||||
version "1.1.6"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9"
|
||||
dependencies:
|
||||
balanced-match "^0.4.1"
|
||||
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.3.0"
|
||||
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.3.0.tgz#df6139f294391b1035be5606f60a843b3a5041e7"
|
||||
|
||||
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"
|
||||
|
||||
early@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/early/-/early-2.1.1.tgz#841e23254ea5dc54d8afaeee82f5ab65c00ee23c"
|
||||
dependencies:
|
||||
beautycolor "^1.0.7"
|
||||
smartq "^1.1.1"
|
||||
typings-global "^1.0.16"
|
||||
|
||||
fs.realpath@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||
|
||||
glob@^7.0.0:
|
||||
version "7.1.1"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
|
||||
dependencies:
|
||||
fs.realpath "^1.0.0"
|
||||
inflight "^1.0.4"
|
||||
inherits "2"
|
||||
minimatch "^3.0.2"
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
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.1"
|
||||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c"
|
||||
|
||||
leakage@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.2.0.tgz#9e7a8cc1d241d8c8427e348769e192e172fd8733"
|
||||
dependencies:
|
||||
left-pad "^1.1.3"
|
||||
memwatch-next "^0.3.0"
|
||||
minimist "^1.2.0"
|
||||
pretty-bytes "^4.0.2"
|
||||
|
||||
left-pad@^1.1.3:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.1.3.tgz#612f61c033f3a9e08e939f1caebeea41b6f3199a"
|
||||
|
||||
memwatch-next@^0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/memwatch-next/-/memwatch-next-0.3.0.tgz#2111050f9a906e0aa2d72a4ec0f0089c78726f8f"
|
||||
dependencies:
|
||||
bindings "^1.2.1"
|
||||
nan "^2.3.2"
|
||||
|
||||
minimatch@^3.0.2:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
|
||||
dependencies:
|
||||
brace-expansion "^1.0.0"
|
||||
|
||||
minimist@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
|
||||
|
||||
nan@^2.3.2:
|
||||
version "2.6.2"
|
||||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45"
|
||||
|
||||
once@^1.3.0:
|
||||
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.2"
|
||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.2.tgz#1f0442c9e0cbb8136e87b9305f932f46c7f28235"
|
||||
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.7:
|
||||
version "0.7.7"
|
||||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1"
|
||||
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"
|
||||
|
||||
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"
|
||||
|
||||
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:
|
||||
version "1.0.16"
|
||||
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.16.tgz#489b71781af24268750c2899316400a5e482961f"
|
||||
dependencies:
|
||||
semver "^5.3.0"
|
||||
shelljs "^0.7.7"
|
||||
|
||||
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