From c531369f9d373d624ca73a6736fc04d8dec29819 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin Date: Sat, 7 Dec 2019 12:37:11 +0000 Subject: [PATCH] test: exclude unused code from coverage --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index 5ec0097..5d08c71 100644 --- a/index.js +++ b/index.js @@ -58,6 +58,12 @@ InstallDots.prototype.compileToFile = function(path, template, def) { , fn; for (var property in defs) { + // It looks like the code block inside "if" below can never be executed, + // because InstallDots constructor is private, compileToFile is only called from compileAll method + // and def parameter is never passed to it, so the condition in if will always fail. + // This code will be removed from the next major version. + // For now it is only excluded from coverage report + /* istanbul ignore if */ if (defs[property] !== def[property] && defs[property] !== this.__includes[property]) { fn = undefined; if (typeof defs[property] === 'string') {