From 813a5d28791fdf019fb8bfc74cd344e27d40cc74 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Fri, 3 Nov 2017 19:20:03 +0000 Subject: [PATCH] add some istanbul ignore to trigger --- nodes/core/core/89-trigger.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nodes/core/core/89-trigger.js b/nodes/core/core/89-trigger.js index 9a664495a..35b50b487 100644 --- a/nodes/core/core/89-trigger.js +++ b/nodes/core/core/89-trigger.js @@ -105,6 +105,7 @@ module.exports = function(RED) { if (node.duration === 0) { node.topics[topic].tout = 0; } else if (node.loop === true) { if (node.topics[topic].tout) { clearInterval(node.topics[topic].tout); } + /* istanbul ignore else */ if (node.op1type !== "nul") { var msg2 = RED.util.cloneMessage(msg); node.topics[topic].tout = setInterval(function() { node.send(RED.util.cloneMessage(msg2)); }, node.duration); @@ -127,6 +128,7 @@ module.exports = function(RED) { node.status({fill:"blue",shape:"dot",text:" "}); } else if ((node.extend === "true" || node.extend === true) && (node.duration > 0)) { + /* istanbul ignore else */ if (node.topics[topic].tout) { clearTimeout(node.topics[topic].tout); } if (node.op2type === "payl") { node.topics[topic].m2 = RED.util.cloneMessage(msg.payload); } node.topics[topic].tout = setTimeout(function() { @@ -149,6 +151,7 @@ module.exports = function(RED) { }); this.on("close", function() { for (var t in node.topics) { + /* istanbul ignore else */ if (node.topics[t]) { if (node.loop === true) { clearInterval(node.topics[t].tout); } else { clearTimeout(node.topics[t].tout); }