fix(core): update
This commit is contained in:
parent
4066d9b0e8
commit
984d551bd6
@ -20,7 +20,15 @@ export class TapCombinator {
|
||||
|
||||
let failGlobal = false; // determine wether tstest should fail
|
||||
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 =
|
||||
logPrefixes.TsTestPrefix +
|
||||
cs(` ${tapParser.fileName} ${plugins.figures.tick}`, 'green') +
|
||||
@ -28,13 +36,13 @@ export class TapCombinator {
|
||||
tapParser.getTestOverviewAsString();
|
||||
console.log(overviewString);
|
||||
} else {
|
||||
failGlobal = true;
|
||||
let overviewString =
|
||||
logPrefixes.TsTestPrefix +
|
||||
cs(` ${tapParser.fileName} ${plugins.figures.cross}`, 'red') +
|
||||
` ${plugins.figures.pointer} ` +
|
||||
tapParser.getTestOverviewAsString();
|
||||
console.log(overviewString);
|
||||
failGlobal = true;
|
||||
}
|
||||
}
|
||||
console.log(cs(plugins.figures.hamburger.repeat(48), 'cyan'));
|
||||
|
@ -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')}`);
|
||||
} else {
|
||||
console.log(
|
||||
|
Loading…
Reference in New Issue
Block a user