X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fstub-logger.js;fp=test%2Fstub-logger.js;h=5ac0b984fc33608c9860755e799ff8552049865d;hb=044615f53bacdc366b44941218d808c549607469;hp=0000000000000000000000000000000000000000;hpb=ce8cea8bfb4aec2505d8bd45e4e8b59636f64bf9;p=squeep-mystery-box diff --git a/test/stub-logger.js b/test/stub-logger.js new file mode 100644 index 0000000..5ac0b98 --- /dev/null +++ b/test/stub-logger.js @@ -0,0 +1,18 @@ +'use strict'; + +const sinon = require('sinon'); // eslint-disable-line node/no-unpublished-require + +const nop = () => { /* */ }; +const stubLogger = process.env.VERBOSE_TESTS ? console : { + debug: nop, + error: nop, + info: nop, +}; +stubLogger['_reset'] = () => { + sinon.spy(stubLogger, 'debug'); + sinon.spy(stubLogger, 'error'); + sinon.spy(stubLogger, 'info'); +}, + + +module.exports = stubLogger; \ No newline at end of file