From 11b4613e203d48c896fc66a24f228ca4e40549f5 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Fri, 1 Jun 2018 12:56:46 +0200 Subject: [PATCH] Reduce the amount of console "spam", by ignoring `info`/`warn` calls, when running the unit-tests in Node.js/Travis Compared to running the unit-tests in "regular" browsers, where any console output won't get mixed up with test output, in Node.js/Travis the test output looks quite noisy. By ignoring `info`/`warn` calls, when running unit-tests in Node.js/Travis, the test output is a lot smaller not to mention that any *actual* failures are more easily spotted. --- test/unit/clitests_helper.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/unit/clitests_helper.js b/test/unit/clitests_helper.js index 15f6ffa2d..11d9475e9 100644 --- a/test/unit/clitests_helper.js +++ b/test/unit/clitests_helper.js @@ -13,6 +13,7 @@ * limitations under the License. */ +import { setVerbosityLevel, VerbosityLevel } from '../../src/shared/util'; import isNodeJS from '../../src/shared/is_node'; import { PDFNodeStream } from '../../src/display/node_stream'; import { setPDFNetworkStreamFactory } from '../../src/display/api'; @@ -23,6 +24,10 @@ if (!isNodeJS()) { 'Node.js environments.'); } +// Reduce the amount of console "spam", by ignoring `info`/`warn` calls, +// when running the unit-tests in Node.js/Travis. +setVerbosityLevel(VerbosityLevel.ERRORS); + // Set the network stream factory for the unit-tests. setPDFNetworkStreamFactory(function(params) { return new PDFNodeStream(params);