fix(console): shorten log output

This commit is contained in:
Philipp Kunz 2018-08-04 19:41:00 +02:00
parent 953a4e4b72
commit 24a6b7480b
4 changed files with 28 additions and 5 deletions

20
package-lock.json generated
View File

@ -1,5 +1,5 @@
{
"name": "@pushrocks/tstest",
"name": "@gitzone/tstest",
"version": "1.0.8",
"lockfileVersion": 1,
"requires": true,
@ -151,6 +151,11 @@
"@types/chai": "*"
}
},
"@types/figures": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@types/figures/-/figures-2.0.0.tgz",
"integrity": "sha512-mcRgJ+ncKuNI+Dwac7omO18B8C8u+YBS+AU/oyLhEyjAnT3cUUThhHgZpbiIvu5ZqSvdD30BXtrqg9nxc3OKMg=="
},
"@types/form-data": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz",
@ -397,11 +402,24 @@
"integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
"dev": true
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"esprima": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
},
"figures": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz",
"integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=",
"requires": {
"escape-string-regexp": "^1.0.5"
}
},
"first-chunk-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz",

View File

@ -28,6 +28,8 @@
"@pushrocks/smartfile": "^6.0.3",
"@pushrocks/smartlog": "^2.0.1",
"@pushrocks/smartpromise": "^2.0.5",
"@pushrocks/smartshell": "^2.0.5"
"@pushrocks/smartshell": "^2.0.5",
"@types/figures": "^2.0.0",
"figures": "^2.0.0"
}
}

View File

@ -8,4 +8,7 @@ import * as smartlog from '@pushrocks/smartlog';
import * as smartpromise from '@pushrocks/smartpromise';
import * as smartshell from '@pushrocks/smartshell';
export { consolecolor, path, smartfile, smartlog, smartpromise, smartshell };
// sindresorhus
import * as figures from 'figures';
export { consolecolor, figures, path, smartfile, smartlog, smartpromise, smartshell };

View File

@ -64,14 +64,14 @@ export class TapParser {
if (testOk) {
console.log(
logPrefixes.TapPrefix,
` ${cs(`Test ${testId} -> Success!`, 'green')} | ` +
` ${cs(`T${testId} ${plugins.figures.tick}`, 'green')} | ` +
cs(testSubject, 'blue') +
` | ${cs(`${testDuration} milliseconds`, 'orange')}`
);
} else {
console.log(
logPrefixes.TapPrefix,
` ${cs(`Test ${testId} -> Error!`, 'red')} | ` +
` ${cs(`T${testId} ${plugins.figures.cross}`, 'red')} | ` +
cs(testSubject, 'blue') +
` | ${cs(`${testDuration} milliseconds`, 'orange')}`
);