aboutsummaryrefslogtreecommitdiff
path: root/node_modules/ava/lib/logger.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-12-27 19:33:54 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-12-27 19:34:16 +0100
commit0e6de2c31dbf8c21277481f112e99c52b913940f (patch)
tree91789032de3b8eec9d789acd1323f25fc5d08422 /node_modules/ava/lib/logger.js
parentceda0da31ad542c598c68146ae0712ca03df3d71 (diff)
node_modules
Diffstat (limited to 'node_modules/ava/lib/logger.js')
-rw-r--r--node_modules/ava/lib/logger.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/node_modules/ava/lib/logger.js b/node_modules/ava/lib/logger.js
index 54bd23c94..e8edb120f 100644
--- a/node_modules/ava/lib/logger.js
+++ b/node_modules/ava/lib/logger.js
@@ -6,6 +6,7 @@ class Logger {
this.reporter = reporter;
autoBind(this);
}
+
start(runStatus) {
if (!this.reporter.start) {
return;
@@ -13,6 +14,7 @@ class Logger {
this.write(this.reporter.start(runStatus), runStatus);
}
+
reset(runStatus) {
if (!this.reporter.reset) {
return;
@@ -20,9 +22,11 @@ class Logger {
this.write(this.reporter.reset(runStatus), runStatus);
}
+
test(test, runStatus) {
this.write(this.reporter.test(test, runStatus), runStatus);
}
+
unhandledError(err, runStatus) {
if (!this.reporter.unhandledError) {
return;
@@ -30,6 +34,7 @@ class Logger {
this.write(this.reporter.unhandledError(err, runStatus), runStatus);
}
+
finish(runStatus) {
if (!this.reporter.finish) {
return;
@@ -37,6 +42,7 @@ class Logger {
this.write(this.reporter.finish(runStatus), runStatus);
}
+
section() {
if (!this.reporter.section) {
return;
@@ -44,6 +50,7 @@ class Logger {
this.write(this.reporter.section());
}
+
clear() {
if (!this.reporter.clear) {
return false;
@@ -52,6 +59,7 @@ class Logger {
this.write(this.reporter.clear());
return true;
}
+
write(str, runStatus) {
if (typeof str === 'undefined') {
return;
@@ -59,6 +67,7 @@ class Logger {
this.reporter.write(str, runStatus);
}
+
stdout(data, runStatus) {
if (!this.reporter.stdout) {
return;
@@ -66,6 +75,7 @@ class Logger {
this.reporter.stdout(data, runStatus);
}
+
stderr(data, runStatus) {
if (!this.reporter.stderr) {
return;
@@ -73,6 +83,7 @@ class Logger {
this.reporter.stderr(data, runStatus);
}
+
exit(code) {
process.exit(code); // eslint-disable-line unicorn/no-process-exit
}