From 392d3b94bdd1f37d70b201ea19ee4f73844678ec Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Mon, 30 Jul 2018 16:41:39 -0700 Subject: [PATCH] Revert "chore(tests): redirect debugError to the output category of tests (#2969)" (#2987) This reverts commit c5fe1dbdbb49c4a348cbe996bb7e87cc276c1145. --- lib/Tracing.js | 4 +--- test/test.js | 9 +-------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/lib/Tracing.js b/lib/Tracing.js index a6475337..51191884 100644 --- a/lib/Tracing.js +++ b/lib/Tracing.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -const {helper, assert, debugError} = require('./helper'); +const {helper, assert} = require('./helper'); const fs = require('fs'); const openAsync = helper.promisify(fs.open); @@ -89,8 +89,6 @@ class Tracing { let resultBuffer = null; try { resultBuffer = Buffer.concat(bufs); - } catch (error) { - debugError(error); } finally { return resultBuffer; } diff --git a/test/test.js b/test/test.js index 91f6d900..0dd01767 100644 --- a/test/test.js +++ b/test/test.js @@ -22,7 +22,7 @@ const GOLDEN_DIR = path.join(__dirname, 'golden'); const OUTPUT_DIR = path.join(__dirname, 'output'); const {TestRunner, Reporter, Matchers} = require('../utils/testrunner/'); -const {helper, assert, debugError} = require('../lib/helper'); +const {helper, assert} = require('../lib/helper'); if (process.env.COVERAGE) helper.recordPublicAPICoverage(); @@ -116,16 +116,9 @@ describe('Page', function() { const rl = require('readline').createInterface({input: state.browser.process().stderr}); test.output = ''; rl.on('line', onLine); - const enableDebugError = !debugError.enabled; - if (enableDebugError) { - require('debug').enable(debugError.namespace); - debugError.log = onLine; - } state.tearDown = () => { rl.removeListener('line', onLine); rl.close(); - if (enableDebugError) - debugError.log = () => undefined; }; function onLine(line) { test.output += line + '\n';