Merge branch 'v1.2-dev' as v1.2.2
[websub-hub] / test / stub-logger.js
1 'use strict';
2
3 const sinon = require('sinon'); // eslint-disable-line node/no-unpublished-require
4
5 const nop = () => { /* */ };
6 const stubLogger = process.env.VERBOSE_TESTS ? console : {
7 debug: nop,
8 error: nop,
9 info: nop,
10 };
11 stubLogger['_reset'] = () => {
12 sinon.spy(stubLogger, 'debug');
13 sinon.spy(stubLogger, 'error');
14 sinon.spy(stubLogger, 'info');
15 },
16
17
18 module.exports = stubLogger;