Skip to content

Commit

Permalink
test: exclude unused code from coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
epoberezkin committed Dec 7, 2019
1 parent b4fd211 commit c531369
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit c531369

Please sign in to comment.