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) {
This commit is contained in:
Lam Wei Li 2022-03-06 23:10:45 +08:00
parent 905a513cf6
commit 6e6dbad5d3
No known key found for this signature in database
GPG Key ID: 90F6ABECF080D7BF

View File

@ -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);