X-Git-Url: https://git.r.bdr.sh/rbdr/cologne/blobdiff_plain/b3847a2e355c1c5113eb99eb1a755535bd225998..25d80f4c0007d891a806364865c8e3edb215034e:/test/loggers/console.js?ds=inline diff --git a/test/loggers/console.js b/test/loggers/console.js index 3358837..87dbc23 100644 --- a/test/loggers/console.js +++ b/test/loggers/console.js @@ -62,7 +62,7 @@ const logObjectB = { message: 'MessageTwo' }; -const logs = [logObjectA, logObjectB]; +const exampleLogs = [logObjectA, logObjectB]; const regularLogger = new ConsoleLogger({}); const overrideLogger = new ConsoleLogger({ @@ -86,38 +86,38 @@ Tap.equal(regularLogger.console, global.console, logObjectA._level = 5; logObjectB._level = 6; -overrideLogger.log(...logs); // should go to info +overrideLogger.log(...exampleLogs); // should go to info logObjectA._level = 4; logObjectB._level = 4; -overrideLogger.log(...logs); // should go to warn +overrideLogger.log(...exampleLogs); // should go to warn logObjectA._level = 1; logObjectB._level = 3; -overrideLogger.log(...logs); // should go to error +overrideLogger.log(...exampleLogs); // should go to error logObjectA._level = 0; logObjectB._level = 2; -overrideLogger.log(...logs); // should go to error +overrideLogger.log(...exampleLogs); // should go to error logObjectA._level = 7; logObjectB._level = 8; -overrideLogger.log(...logs); // should go to log +overrideLogger.log(...exampleLogs); // should go to log -Tap.equal(dummyConsole.values.log, logs.length, +Tap.equal(dummyConsole.values.log, exampleLogs.length, 'It should send debug messages to console\'s #log'); -Tap.equal(dummyConsole.values.info, logs.length, +Tap.equal(dummyConsole.values.info, exampleLogs.length, 'It should send info and notice messages to console\'s #info'); -Tap.equal(dummyConsole.values.warn, logs.length, +Tap.equal(dummyConsole.values.warn, exampleLogs.length, 'It should send warn messages to console\'s #warn'); -Tap.equal(dummyConsole.values.error, logs.length * 2, +Tap.equal(dummyConsole.values.error, exampleLogs.length * 2, 'It should send error messages to console\'s #error'); /** * TEST: #log() - with formatter */ -formattedLogger.log(...logs); // should go to log +formattedLogger.log(...exampleLogs); // should go to log -Tap.similar(dummyFormatter.values, logs, +Tap.similar(dummyFormatter.values, exampleLogs, 'If available, it should send the objects to the formatter');