From 6e6dbad5d34d908ac65eb30e3655ac1075313502 Mon Sep 17 00:00:00 2001 From: Lam Wei Li Date: Sun, 6 Mar 2022 23:10:45 +0800 Subject: [PATCH] chore(test): improve test coverage for multiFileAppender (else path will never be taken) appenders/multiFile.js - Line 17 - /* istanbul ignore else */ appenders/multiFile.js - Line 18 - if (timer && app) { --- lib/appenders/multiFile.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/appenders/multiFile.js b/lib/appenders/multiFile.js index 2fd47b8..f981c3f 100644 --- a/lib/appenders/multiFile.js +++ b/lib/appenders/multiFile.js @@ -14,6 +14,7 @@ module.exports.configure = (config, layouts) => { function checkForTimeout(fileKey) { const timer = timers.get(fileKey); const app = files.get(fileKey); + /* istanbul ignore else */ if (timer && app) { if (Date.now() - timer.lastUsed > timer.timeout) { debug('%s not used for > %d ms => close', fileKey, timer.timeout);