From 7fc056c8e3727e678682e294b8ae5379d4cb9553 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Fri, 17 Jun 2016 08:18:26 +0100 Subject: [PATCH] remove extraneous udp console.log and two tiny whitespace changes --- nodes/core/io/32-udp.html | 1 - nodes/core/io/32-udp.js | 1 - test/nodes/helper.js | 8 +++++--- test/red/api/locales_spec.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nodes/core/io/32-udp.html b/nodes/core/io/32-udp.html index daeb32e3c..ea465ab23 100644 --- a/nodes/core/io/32-udp.html +++ b/nodes/core/io/32-udp.html @@ -112,7 +112,6 @@ $("#node-input-port").change(function() { var portnew = $("#node-input-port").val(); if (portsInUse.hasOwnProperty($("#node-input-port").val())) { - console.log($("#node-input-port").val()); RED.notify(alreadyused+" "+$("#node-input-port").val(),"warn"); } }); diff --git a/nodes/core/io/32-udp.js b/nodes/core/io/32-udp.js index 49f2af39d..f91e74908 100644 --- a/nodes/core/io/32-udp.js +++ b/nodes/core/io/32-udp.js @@ -83,7 +83,6 @@ module.exports = function(RED) { }); node.on("close", function() { - console.log("ID=",node.id); if (udpInputPortsInUse[node.port] === node.id) { delete udpInputPortsInUse[node.port]; } diff --git a/test/nodes/helper.js b/test/nodes/helper.js index cee9887dd..4ccbba913 100644 --- a/test/nodes/helper.js +++ b/test/nodes/helper.js @@ -82,11 +82,11 @@ module.exports = { // do nothing }, }; + var settings = { available: function() { return false; } }; - var red = {}; for (var i in RED) { if (RED.hasOwnProperty(i) && !/^(init|start|stop)$/.test(i)) { @@ -115,6 +115,7 @@ module.exports = { cb(); }); }, + unload: function() { // TODO: any other state to remove between tests? redNodes.clearRegistry(); @@ -137,7 +138,7 @@ module.exports = { }, startServer: function(done) { - server = http.createServer(function(req,res){app(req,res);}); + server = http.createServer(function(req,res) { app(req,res); }); RED.init(server, { SKIP_BUILD_CHECK: true, logging:{console:{level:'off'}} @@ -150,9 +151,10 @@ module.exports = { done(); }); }, + //TODO consider saving TCP handshake/server reinit on start/stop/start sequences stopServer: function(done) { - if(server) { + if (server) { try { server.close(done); } catch(e) { diff --git a/test/red/api/locales_spec.js b/test/red/api/locales_spec.js index 31d5fd673..a258aaa0b 100644 --- a/test/red/api/locales_spec.js +++ b/test/red/api/locales_spec.js @@ -15,5 +15,5 @@ **/ describe("locales api", function() { - it.skip("works",function(){}); + it.skip("works",function() {}); });