UNPKG

tia

Version:

Time is All (logs driven test engine with ExtJs support)

29 lines (25 loc) 502 B
'use strict'; const funcs = [ 'error', 'warn', 'info', 'verbose', 'debug', 'silly', ]; function subTest(logLevel) { if (logLevel) { process.env.LOG_LEVEL = logLevel; } gT.l.println(`log: level: ${logLevel}`); const logger = gT.logUtils.winstonMock('Prefix: '); funcs.forEach(func => logger[func](`${func}`)); gT.l.sep(); } module.exports = function test() { gT.t.setTitle('Winston mock test'); subTest(); subTest('silly'); subTest('info'); subTest('error'); };