diff --git a/lib/builder/webpack/plugins/progress.js b/lib/builder/webpack/plugins/progress.js index 70222bba99..f72e8a045f 100644 --- a/lib/builder/webpack/plugins/progress.js +++ b/lib/builder/webpack/plugins/progress.js @@ -2,7 +2,10 @@ const ProgressBar = require('node-progress-bars') const webpack = require('webpack') module.exports = function ProgressPlugin({ color, pcolor, title }) { - muteConsole() + // eslint-disable-next-line no-console + if (!console.spiedInTest) { + muteConsole() + } // https://github.com/bubkoo/ascii-progress const bar = new ProgressBar({ diff --git a/test/helpers/console.js b/test/helpers/console.js index d541544d00..ade2d43339 100644 --- a/test/helpers/console.js +++ b/test/helpers/console.js @@ -30,6 +30,7 @@ export function release() { } context = null + delete console.spiedInTest // eslint-disable-line no-console } export async function intercept(levels, msg, cb) { @@ -39,6 +40,7 @@ export async function intercept(levels, msg, cb) { ) } context = {} + console.spiedInTest = true // eslint-disable-line no-console if (cb === undefined && typeof msg === 'function') { cb = msg