diff --git a/package.json b/package.json index 21a2f4e..8cd9c40 100644 --- a/package.json +++ b/package.json @@ -48,5 +48,8 @@ "cli.js", "npmextra.json", "readme.md" + ], + "browserslist": [ + "last 1 chrome versions" ] -} +} \ No newline at end of file diff --git a/readme.md b/readme.md index 9d945bd..86d275b 100644 --- a/readme.md +++ b/readme.md @@ -19,12 +19,16 @@ TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud) PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@gitzone/tstest)](https://lossless.cloud) -PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@gitzone/tstest)](https://lossless.cloud) +PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@gitzone/tstest)](https://lossless.cloud) BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@gitzone/tstest)](https://lossless.cloud) Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud) ## Usage +## 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). :) + ## Contribution diff --git a/ts/tstest.classes.tap.combinator.ts b/ts/tstest.classes.tap.combinator.ts index 4c21217..626668b 100644 --- a/ts/tstest.classes.tap.combinator.ts +++ b/ts/tstest.classes.tap.combinator.ts @@ -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 + diff --git a/ts/tstest.classes.tap.parser.ts b/ts/tstest.classes.tap.parser.ts index a02d742..f60d1c0 100644 --- a/ts/tstest.classes.tap.parser.ts +++ b/ts/tstest.classes.tap.parser.ts @@ -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 { diff --git a/ts/tstest.classes.tstest.ts b/ts/tstest.classes.tstest.ts index 46683a3..7f1d343 100644 --- a/ts/tstest.classes.tstest.ts +++ b/ts/tstest.classes.tstest.ts @@ -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); diff --git a/ts/tstest.plugins.ts b/ts/tstest.plugins.ts index f642b79..2ddb5a3 100644 --- a/ts/tstest.plugins.ts +++ b/ts/tstest.plugins.ts @@ -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';