fix(core): update

This commit is contained in:
2020-07-12 00:47:41 +00:00
parent 5e42565567
commit ab33720aba
6 changed files with 44 additions and 11 deletions

View File

@ -28,6 +28,15 @@ export class TapCombinator {
` ${plugins.figures.pointer} ` +
`does not specify tests!`;
console.log(overviewString);
} else if (tapParser.expectedTests !== tapParser.receivedTests) {
failGlobal = true;
let overviewString =
logPrefixes.TsTestPrefix +
cs(` ${tapParser.fileName} ${plugins.figures.cross}`, 'red') +
` ${plugins.figures.pointer} ` +
tapParser.getTestOverviewAsString() +
`did not execute all specified tests!`;
console.log(overviewString);
} else if (tapParser.getErrorTests().length === 0) {
let overviewString =
logPrefixes.TsTestPrefix +

View File

@ -182,7 +182,12 @@ export class TapParser {
if (!this.expectedTests) {
console.log(cs('Error: No tests were defined. Therefore the testfile failed!', 'red'));
} else if (this.expectedTests !== this.receivedTests) {
console.log(cs('Error: The amount of received tests and expectedTests is unequal! Therefore the testfile failed', 'red'));
console.log(
cs(
'Error: The amount of received tests and expectedTests is unequal! Therefore the testfile failed',
'red'
)
);
} else if (this.getErrorTests().length === 0) {
console.log(`${logPrefixes.TapPrefix} ${cs(`All tests are successfull!!!`, 'green')}`);
} else {

View File

@ -168,16 +168,18 @@ export class TsTest {
const bundleName = new URLSearchParams(window.location.search).get('bundleName');
console.log(`::TSTEST IN CHROMIUM:: Relevant Script name is: ${bundleName}`);
const bundleResponse = await fetch(`/${bundleName}`);
console.log(`::TSTEST IN CHROMIUM:: Got ${bundleName} with STATUS ${bundleResponse.status}`);
console.log(
`::TSTEST IN CHROMIUM:: Got ${bundleName} with STATUS ${bundleResponse.status}`
);
const bundle = await bundleResponse.text();
console.log(`::TSTEST IN CHROMIUM:: Executing ${bundleName}`);
try {
try {
// tslint:disable-next-line: no-eval
eval(bundle);
} catch (err) {
console.error(err);
}
if (globalThis.tapbundleDeferred && globalThis.tapbundleDeferred.promise) {
await globalThis.tapbundleDeferred.promise;
} else {
@ -188,7 +190,9 @@ export class TsTest {
);
await this.smartbrowserInstance.stop();
await server.stop();
console.log(`${cs('=> ', 'blue')} Stopped ${cs(fileNameArg, 'orange')} chromium instance and server.`);
console.log(
`${cs('=> ', 'blue')} Stopped ${cs(fileNameArg, 'orange')} chromium instance and server.`
);
console.log(`${cs('=> ', 'blue')} See the result captured from the chromium execution:`);
// lets create the tap parser
const tapParser = new TapParser(fileNameArg);

View File

@ -14,14 +14,22 @@ import * as smartpromise from '@pushrocks/smartpromise';
import * as smartshell from '@pushrocks/smartshell';
import * as tapbundle from '@pushrocks/tapbundle';
export { consolecolor, smartbrowser, smartexpress, smartdelay, smartfile, smartlog, smartpromise, smartshell, tapbundle };
export {
consolecolor,
smartbrowser,
smartexpress,
smartdelay,
smartfile,
smartlog,
smartpromise,
smartshell,
tapbundle,
};
// @gitzone scope
import * as tsbundle from '@gitzone/tsbundle';
export {
tsbundle
};
export { tsbundle };
// sindresorhus
import * as figures from 'figures';