Compare commits

..

6 Commits

Author SHA1 Message Date
5e42565567 1.0.42 2020-07-11 16:14:08 +00:00
88b7581eeb fix(core): update 2020-07-11 16:14:07 +00:00
0ea621cb99 1.0.41 2020-07-11 15:52:32 +00:00
984d551bd6 fix(core): update 2020-07-11 15:52:31 +00:00
4066d9b0e8 1.0.40 2020-07-09 23:20:15 +00:00
f24ff2f79e fix(core): update 2020-07-09 23:20:14 +00:00
6 changed files with 23 additions and 11 deletions

8
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@gitzone/tstest", "name": "@gitzone/tstest",
"version": "1.0.39", "version": "1.0.42",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -1567,9 +1567,9 @@
} }
}, },
"@pushrocks/tapbundle": { "@pushrocks/tapbundle": {
"version": "3.2.7", "version": "3.2.9",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.2.7.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.2.9.tgz",
"integrity": "sha512-RBRjuJs3v/biKypc9rSecApn7IXRdmr/jbVH86+2mDxyzUQ8IcMhaKhUrIjKoNyvxvMAMS2j+OxPyiOCnK6RAw==", "integrity": "sha512-vtmYL/l7BZvAzySh7cYnnTG6CFMp5zYtowJuMAmqUjhIaQaWW1Tvbrpjp7lVwRXj2JlL/i69KcJ6RVdLItK+rA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@pushrocks/smartdelay": "^2.0.9", "@pushrocks/smartdelay": "^2.0.9",

View File

@ -1,6 +1,6 @@
{ {
"name": "@gitzone/tstest", "name": "@gitzone/tstest",
"version": "1.0.39", "version": "1.0.42",
"private": false, "private": false,
"description": "a test utility to run tests that match test/**/*.ts", "description": "a test utility to run tests that match test/**/*.ts",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
@ -19,7 +19,6 @@
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.17", "@gitzone/tsbuild": "^2.1.17",
"@pushrocks/tapbundle": "^3.2.7",
"tslint": "^6.1.2", "tslint": "^6.1.2",
"tslint-config-prettier": "^1.18.0" "tslint-config-prettier": "^1.18.0"
}, },
@ -34,6 +33,7 @@
"@pushrocks/smartlog": "^2.0.19", "@pushrocks/smartlog": "^2.0.19",
"@pushrocks/smartpromise": "^3.0.6", "@pushrocks/smartpromise": "^3.0.6",
"@pushrocks/smartshell": "^2.0.25", "@pushrocks/smartshell": "^2.0.25",
"@pushrocks/tapbundle": "^3.2.9",
"@types/figures": "^3.0.1", "@types/figures": "^3.0.1",
"figures": "^3.0.0" "figures": "^3.0.0"
}, },

View File

@ -20,7 +20,15 @@ export class TapCombinator {
let failGlobal = false; // determine wether tstest should fail let failGlobal = false; // determine wether tstest should fail
for (const tapParser of this.tapParserStore) { for (const tapParser of this.tapParserStore) {
if (tapParser.getErrorTests().length === 0) { if (!tapParser.expectedTests) {
failGlobal = true;
let overviewString =
logPrefixes.TsTestPrefix +
cs(` ${tapParser.fileName} ${plugins.figures.cross}`, 'red') +
` ${plugins.figures.pointer} ` +
`does not specify tests!`;
console.log(overviewString);
} else if (tapParser.getErrorTests().length === 0) {
let overviewString = let overviewString =
logPrefixes.TsTestPrefix + logPrefixes.TsTestPrefix +
cs(` ${tapParser.fileName} ${plugins.figures.tick}`, 'green') + cs(` ${tapParser.fileName} ${plugins.figures.tick}`, 'green') +
@ -28,13 +36,13 @@ export class TapCombinator {
tapParser.getTestOverviewAsString(); tapParser.getTestOverviewAsString();
console.log(overviewString); console.log(overviewString);
} else { } else {
failGlobal = true;
let overviewString = let overviewString =
logPrefixes.TsTestPrefix + logPrefixes.TsTestPrefix +
cs(` ${tapParser.fileName} ${plugins.figures.cross}`, 'red') + cs(` ${tapParser.fileName} ${plugins.figures.cross}`, 'red') +
` ${plugins.figures.pointer} ` + ` ${plugins.figures.pointer} ` +
tapParser.getTestOverviewAsString(); tapParser.getTestOverviewAsString();
console.log(overviewString); console.log(overviewString);
failGlobal = true;
} }
} }
console.log(cs(plugins.figures.hamburger.repeat(48), 'cyan')); console.log(cs(plugins.figures.hamburger.repeat(48), 'cyan'));

View File

@ -179,7 +179,11 @@ export class TapParser {
)}` )}`
); );
} }
if (this.getErrorTests().length === 0) { 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'));
} else if (this.getErrorTests().length === 0) {
console.log(`${logPrefixes.TapPrefix} ${cs(`All tests are successfull!!!`, 'green')}`); console.log(`${logPrefixes.TapPrefix} ${cs(`All tests are successfull!!!`, 'green')}`);
} else { } else {
console.log( console.log(

View File

@ -7,7 +7,6 @@ import { coloredString as cs } from '@pushrocks/consolecolor';
import { TestDirectory } from './tstest.classes.testdirectory'; import { TestDirectory } from './tstest.classes.testdirectory';
import { TapCombinator } from './tstest.classes.tap.combinator'; import { TapCombinator } from './tstest.classes.tap.combinator';
import { TapParser } from './tstest.classes.tap.parser'; import { TapParser } from './tstest.classes.tap.parser';
import { threeEighths } from 'figures';
export class TsTest { export class TsTest {
public testDir: TestDirectory; public testDir: TestDirectory;

View File

@ -12,8 +12,9 @@ import * as smartfile from '@pushrocks/smartfile';
import * as smartlog from '@pushrocks/smartlog'; import * as smartlog from '@pushrocks/smartlog';
import * as smartpromise from '@pushrocks/smartpromise'; import * as smartpromise from '@pushrocks/smartpromise';
import * as smartshell from '@pushrocks/smartshell'; import * as smartshell from '@pushrocks/smartshell';
import * as tapbundle from '@pushrocks/tapbundle';
export { consolecolor, smartbrowser, smartexpress, smartdelay, smartfile, smartlog, smartpromise, smartshell }; export { consolecolor, smartbrowser, smartexpress, smartdelay, smartfile, smartlog, smartpromise, smartshell, tapbundle };
// @gitzone scope // @gitzone scope
import * as tsbundle from '@gitzone/tsbundle'; import * as tsbundle from '@gitzone/tsbundle';