Skip to content

Commit

Permalink
test: update test fn
Browse files Browse the repository at this point in the history
  • Loading branch information
abhilash-sivan committed Dec 17, 2024
1 parent bc26f6b commit bbed1fe
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions packages/collector/test/logger_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);
}

Expand Down

0 comments on commit bbed1fe

Please sign in to comment.