diff --git a/tests/test.rfb.js b/tests/test.rfb.js index 3cf8fcd8..71129dcd 100644 --- a/tests/test.rfb.js +++ b/tests/test.rfb.js @@ -7,6 +7,7 @@ import Websock from '../core/websock.js'; import ZStream from "../vendor/pako/lib/zlib/zstream.js"; import { deflateInit, deflate, Z_DEFAULT_COMPRESSION } from "../vendor/pako/lib/zlib/deflate.js"; import { encodings } from '../core/encodings.js'; +import { initLogging } from '../core/util/logging.js'; import { toUnsigned32bit } from '../core/util/int.js'; import { encodeUTF8 } from '../core/util/strings.js'; import KeyTable from '../core/input/keysym.js'; @@ -115,6 +116,9 @@ describe('Remote Frame Buffer Protocol Client', function () { // Avoiding printing the entire Websock buffer on errors Websock.prototype.inspect = function () { return "[object Websock]"; }; + + // Avoid spamming test output + initLogging('none'); }); after(function () { diff --git a/tests/test.util.js b/tests/test.util.js index 766e51ed..8a48f6a7 100644 --- a/tests/test.util.js +++ b/tests/test.util.js @@ -11,11 +11,11 @@ describe('Utils', function () { describe('logging functions', function () { beforeEach(function () { - sinon.spy(console, 'log'); - sinon.spy(console, 'debug'); - sinon.spy(console, 'warn'); - sinon.spy(console, 'error'); - sinon.spy(console, 'info'); + sinon.stub(console, 'log'); + sinon.stub(console, 'debug'); + sinon.stub(console, 'warn'); + sinon.stub(console, 'error'); + sinon.stub(console, 'info'); }); afterEach(function () { diff --git a/tests/test.webutil.js b/tests/test.webutil.js index 4bea3ca5..4ed087cb 100644 --- a/tests/test.webutil.js +++ b/tests/test.webutil.js @@ -5,6 +5,7 @@ import { expect } from 'chai'; import sinon from 'sinon'; import * as WebUtil from '../app/webutil.js'; +import { initLogging } from '../core/util/logging.js'; describe('WebUtil', function () { "use strict"; @@ -67,6 +68,9 @@ describe('WebUtil', function () { before(function () { chrome = window.chrome; window.chrome = null; + + // Avoid spamming test output + initLogging('none'); }); after(function () { window.chrome = chrome;