diff --git a/packages/collector/test/logger_test.js b/packages/collector/test/logger_test.js index 18646c1ad..4025e658f 100644 --- a/packages/collector/test/logger_test.js +++ b/packages/collector/test/logger_test.js @@ -170,19 +170,16 @@ describe.only('logger', () => { }); /** - * function to check if the given object is a Pino logger. - * @param {any} logger + * @param {*} _logger * @returns {boolean} */ -function isPinoLogger(logger) { +function isPinoLogger(_logger) { return ( - logger && - typeof logger.trace === 'function' && - typeof logger.debug === 'function' && - typeof logger.info === 'function' && - typeof logger.warn === 'function' && - typeof logger.error === 'function' && - typeof logger.fatal === 'function' + _logger && + typeof _logger === 'object' && + typeof _logger.child === 'function' && + typeof _logger.level === 'string' && + typeof _logger[pino.symbols.streamSym] !== 'undefined' ); }