From 31a6f44c97a25c95cc8e9aba3561f670972c8070 Mon Sep 17 00:00:00 2001 From: Behind The Math Date: Tue, 20 Mar 2018 18:43:34 -0400 Subject: [PATCH] Ignore lines from coverage if they can't be tested --- lib/eval-script.js | 2 ++ lib/parse-options.js | 1 + lib/util/clone.js | 1 + 3 files changed, 4 insertions(+) diff --git a/lib/eval-script.js b/lib/eval-script.js index 0569e76..fd13afa 100644 --- a/lib/eval-script.js +++ b/lib/eval-script.js @@ -13,6 +13,7 @@ module.exports = function(el) { script.type = "text/javascript" + /* istanbul ignore if */ if (src !== "") { script.src = src script.async = false // force synchronous loading of peripheral JS @@ -23,6 +24,7 @@ module.exports = function(el) { script.appendChild(document.createTextNode(code)) } catch (e) { + /* istanbul ignore next */ // old IEs have funky script nodes script.text = code } diff --git a/lib/parse-options.js b/lib/parse-options.js index b65cd48..948dee0 100644 --- a/lib/parse-options.js +++ b/lib/parse-options.js @@ -30,6 +30,7 @@ module.exports = function(options) { return options } +/* istanbul ignore next */ function defaultAnalytics() { if (window._gaq) { _gaq.push(["_trackPageview"]) diff --git a/lib/util/clone.js b/lib/util/clone.js index 674baa3..c4e755b 100644 --- a/lib/util/clone.js +++ b/lib/util/clone.js @@ -1,4 +1,5 @@ module.exports = function(obj) { + /* istanbul ignore if */ if (null === obj || "object" !== typeof obj) { return obj }