fix(log): improve log output

This commit is contained in:
Philipp Kunz 2018-08-05 23:20:32 +02:00
parent 5e1b378ac6
commit 8f61b5648f
2 changed files with 7 additions and 5 deletions

View File

@ -1,5 +1,7 @@
import * as plugins from './tstest.plugins';
import * as paths from './tstest.paths';
import * as logPrefixes from './tstest.logprefixes';
import { coloredString as cs } from '@pushrocks/consolecolor';
import { TestDirectory } from './tstest.classes.testdirectory';
@ -15,9 +17,9 @@ export class TsTest {
async run() {
const fileNamesToRun: string[] = await this.testDir.getTestFilePathArray();
console.log(`Found ${fileNamesToRun.length} Testfile(s):`);
console.log(`${logPrefixes.TsTestPrefix} Found ${fileNamesToRun.length} Testfile(s):`);
for (const fileName of fileNamesToRun) {
console.log(cs(fileName, 'orange'));
console.log(`${logPrefixes.TsTestPrefix} ${cs(fileName, 'orange')}`);
}
console.log('-'.repeat(16));
console.log(''); // force new line

View File

@ -1,7 +1,7 @@
import * as plugins from './tstest.plugins';
import { coloredString as cs } from '@pushrocks/consolecolor';
export const TapPrefix = cs(`:::TAP:::`, 'pink', 'black');
export const TapErrorPrefix = cs(`!!!TAP PROTOCOL ERROR!!!`, 'red', 'black');
export const TapPrefix = cs(`::TAP::`, 'pink', 'black');
export const TapErrorPrefix = cs(` !!!TAP PROTOCOL ERROR!!! `, 'red', 'black');
export const TsTestPrefix = cs(`>>>TSTEST<<<`, 'pink', 'black');
export const TsTestPrefix = cs(`**TSTEST**`, 'pink', 'black');