fix(core): update

This commit is contained in:
Philipp Kunz 2020-07-08 00:11:16 +00:00
parent a6dd8de0db
commit ed8c8312c2
5 changed files with 20 additions and 23 deletions

22
package-lock.json generated
View File

@ -1145,9 +1145,9 @@
} }
}, },
"@gitzone/tstest": { "@gitzone/tstest": {
"version": "1.0.35", "version": "1.0.36",
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftstest/-/tstest-1.0.35.tgz", "resolved": "https://verdaccio.lossless.one/@gitzone%2ftstest/-/tstest-1.0.36.tgz",
"integrity": "sha512-Eij/Cgxs/YGDtQ0NSndp0sT97ugwcQGUt9y2QzWgntTb0IY+HTZCxLTD00Xn9m5CRevUO5sB4dyRp0GGDtC5wA==", "integrity": "sha512-afyZQeCgpEs+/X4aqwbg8fBQcjfMe/Ir3Jmj/TDFGDXjwhmNGx93AasiOALjpFRTQ5foRYB9SqDKgVv6c3cKVQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@gitzone/tsbundle": "^1.0.72", "@gitzone/tsbundle": "^1.0.72",
@ -1323,7 +1323,6 @@
"version": "4.0.10", "version": "4.0.10",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartenv/-/smartenv-4.0.10.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartenv/-/smartenv-4.0.10.tgz",
"integrity": "sha512-b9jJbBSaOl0nlujyEu/0q5lkOFSMmfcOwPGb3pYrF1B37O15qmVpuqYwA5T8BXj8A6y+oA2bwrrtDzQ7hYp1zg==", "integrity": "sha512-b9jJbBSaOl0nlujyEu/0q5lkOFSMmfcOwPGb3pYrF1B37O15qmVpuqYwA5T8BXj8A6y+oA2bwrrtDzQ7hYp1zg==",
"dev": true,
"requires": { "requires": {
"@pushrocks/smartparam": "^1.1.6", "@pushrocks/smartparam": "^1.1.6",
"@pushrocks/smartpromise": "^3.0.6", "@pushrocks/smartpromise": "^3.0.6",
@ -1700,7 +1699,6 @@
"version": "1.1.6", "version": "1.1.6",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartparam/-/smartparam-1.1.6.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartparam/-/smartparam-1.1.6.tgz",
"integrity": "sha512-1El/F2QTWYDGy4Nh6vz9Ry1JVg1FEeyexB7Uvi4zHElpXYVxwso6xImRTLj+SW50JAg7nwEZ+ljkzTG9XvnwWA==", "integrity": "sha512-1El/F2QTWYDGy4Nh6vz9Ry1JVg1FEeyexB7Uvi4zHElpXYVxwso6xImRTLj+SW50JAg7nwEZ+ljkzTG9XvnwWA==",
"dev": true,
"requires": { "requires": {
"@pushrocks/smartpromise": "^3.0.6", "@pushrocks/smartpromise": "^3.0.6",
"is-promise": "^2.1.0", "is-promise": "^2.1.0",
@ -2108,8 +2106,7 @@
"@types/node": { "@types/node": {
"version": "14.0.19", "version": "14.0.19",
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-14.0.19.tgz", "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-14.0.19.tgz",
"integrity": "sha512-yf3BP/NIXF37BjrK5klu//asUWitOEoUP5xE1mhSUjazotwJ/eJDgEmMQNlOeWOVv72j24QQ+3bqXHE++CFGag==", "integrity": "sha512-yf3BP/NIXF37BjrK5klu//asUWitOEoUP5xE1mhSUjazotwJ/eJDgEmMQNlOeWOVv72j24QQ+3bqXHE++CFGag=="
"dev": true
}, },
"@types/parcel-bundler": { "@types/parcel-bundler": {
"version": "1.12.1", "version": "1.12.1",
@ -2616,8 +2613,7 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://verdaccio.lossless.one/balanced-match/-/balanced-match-1.0.0.tgz", "resolved": "https://verdaccio.lossless.one/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
"dev": true
}, },
"base": { "base": {
"version": "0.11.2", "version": "0.11.2",
@ -2786,7 +2782,6 @@
"version": "1.1.11", "version": "1.1.11",
"resolved": "https://verdaccio.lossless.one/brace-expansion/-/brace-expansion-1.1.11.tgz", "resolved": "https://verdaccio.lossless.one/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
@ -3435,8 +3430,7 @@
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"resolved": "https://verdaccio.lossless.one/concat-map/-/concat-map-0.0.1.tgz", "resolved": "https://verdaccio.lossless.one/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
"dev": true
}, },
"concat-stream": { "concat-stream": {
"version": "1.6.2", "version": "1.6.2",
@ -6558,8 +6552,7 @@
"is-promise": { "is-promise": {
"version": "2.2.2", "version": "2.2.2",
"resolved": "https://verdaccio.lossless.one/is-promise/-/is-promise-2.2.2.tgz", "resolved": "https://verdaccio.lossless.one/is-promise/-/is-promise-2.2.2.tgz",
"integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ=="
"dev": true
}, },
"is-reference": { "is-reference": {
"version": "1.2.1", "version": "1.2.1",
@ -7245,7 +7238,6 @@
"version": "3.0.4", "version": "3.0.4",
"resolved": "https://verdaccio.lossless.one/minimatch/-/minimatch-3.0.4.tgz", "resolved": "https://verdaccio.lossless.one/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }

View File

@ -21,6 +21,7 @@
"homepage": "https://gitlab.com/pushrocks/tapbundle#README", "homepage": "https://gitlab.com/pushrocks/tapbundle#README",
"dependencies": { "dependencies": {
"@pushrocks/smartdelay": "^2.0.9", "@pushrocks/smartdelay": "^2.0.9",
"@pushrocks/smartenv": "^4.0.10",
"@pushrocks/smartpromise": "^3.0.2", "@pushrocks/smartpromise": "^3.0.2",
"@pushrocks/smarttime": "^3.0.19", "@pushrocks/smarttime": "^3.0.19",
"smartchai": "^2.0.1" "smartchai": "^2.0.1"
@ -28,7 +29,7 @@
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.24", "@gitzone/tsbuild": "^2.1.24",
"@gitzone/tsrun": "^1.2.12", "@gitzone/tsrun": "^1.2.12",
"@gitzone/tstest": "^1.0.35", "@gitzone/tstest": "^1.0.36",
"@types/node": "^14.0.19", "@types/node": "^14.0.19",
"randomstring": "^1.1.5", "randomstring": "^1.1.5",
"tslint": "^6.1.2", "tslint": "^6.1.2",

View File

@ -9,7 +9,7 @@ const test1 = tap.test('my first test -> expect true to be true', async () => {
}); });
const test2 = tap.test('my second test', async tools => { const test2 = tap.test('my second test', async tools => {
await tools.delayFor(1000); await tools.delayFor(50);
}); });
const test3 = tap.test( const test3 = tap.test(
@ -17,7 +17,7 @@ const test3 = tap.test(
async () => { async () => {
expect((await test1).hrtMeasurement.milliSeconds < (await test2).hrtMeasurement.milliSeconds).to expect((await test1).hrtMeasurement.milliSeconds < (await test2).hrtMeasurement.milliSeconds).to
.be.true; .be.true;
expect((await test2).hrtMeasurement.milliSeconds > 1000).to.be.true; expect((await test2).hrtMeasurement.milliSeconds > 10).to.be.true;
} }
); );
@ -34,9 +34,7 @@ const test5 = tap.test('my 5th test -> should pass in about 500ms', async tools
const test6 = tap.skip.test('my 6th test -> should fail after 1000ms', async tools => { const test6 = tap.skip.test('my 6th test -> should fail after 1000ms', async tools => {
tools.allowFailure(); tools.allowFailure();
tools.timeout(1000); tools.timeout(1000);
await tools.delayFor(2000); await tools.delayFor(100);
}); });
tap.start().catch(err => { tap.start();
console.log(err);
});

View File

@ -83,6 +83,11 @@ export class Tap {
* starts the test evaluation * starts the test evaluation
*/ */
public async start(optionsArg?: { throwOnError: boolean }) { public async start(optionsArg?: { throwOnError: boolean }) {
// lets set the tapbundle promise
const smartenvInstance = new plugins.smartenv.Smartenv();
smartenvInstance.isBrowser ? globalThis.tapbundleDeferred = plugins.smartpromise.defer() : null;
// lets continue with running the tests
const promiseArray: Array<Promise<any>> = []; const promiseArray: Array<Promise<any>> = [];
// safeguard against empty test array // safeguard against empty test array

View File

@ -1,8 +1,9 @@
// pushrocks // pushrocks
import * as smartdelay from '@pushrocks/smartdelay'; import * as smartdelay from '@pushrocks/smartdelay';
import * as smartenv from '@pushrocks/smartenv';
import * as smartpromise from '@pushrocks/smartpromise'; import * as smartpromise from '@pushrocks/smartpromise';
export { smartdelay, smartpromise }; export { smartdelay, smartenv, smartpromise };
// third party // third party
/* import * as leakage from 'leakage'; /* import * as leakage from 'leakage';