From 7bc25b8b47999deae7788e29be0d97d304fe476c Mon Sep 17 00:00:00 2001 From: Stuart Chinery <163900+schinery@users.noreply.github.com> Date: Wed, 10 Mar 2021 07:01:30 +0000 Subject: [PATCH] Include console.error messages when showWarnings is enabled (#26) --- SilentReporter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SilentReporter.js b/SilentReporter.js index c1c0398..c28178f 100644 --- a/SilentReporter.js +++ b/SilentReporter.js @@ -53,7 +53,7 @@ class SilentReporter { this.stdio.log('\n' + testResult.failureMessage); if (testResult.console && this.showWarnings) { testResult.console - .filter(entry => entry.type === 'warn' && entry.message) + .filter(entry => ['error', 'warn'].includes(entry.type) && entry.message) .map(entry => entry.message) .forEach(this.stdio.log); }