fix reporter

This commit is contained in:
Joao Moreno 2018-09-26 14:55:03 +02:00
parent 47bf9b65e8
commit bd0e3aa0cc
2 changed files with 3 additions and 3 deletions

View file

@ -73,10 +73,10 @@ function createReporter() {
return es.through(null, function () {
onEnd();
if (emitError && errors.length > 0) {
errors.__logged__ = true;
if (!errors.__logged__) {
log();
}
errors.__logged__ = true;
var err = new Error("Found " + errors.length + " errors");
err.__reporter__ = true;
this.emit('error', err);

View file

@ -94,12 +94,12 @@ export function createReporter(): IReporter {
onEnd();
if (emitError && errors.length > 0) {
(errors as any).__logged__ = true;
if (!(errors as any).__logged__) {
log();
}
(errors as any).__logged__ = true;
const err = new Error(`Found ${errors.length} errors`);
(err as any).__reporter__ = true;
this.emit('error', err);