From eb57089f0668d4e805e71a605e66b00b1fb07e2f Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 22 Jul 2015 11:41:58 +0100 Subject: [PATCH] Add flag to disable build check for tests --- red/red.js | 4 +++- test/nodes/helper.js | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/red/red.js b/red/red.js index cb6071564..c96888224 100644 --- a/red/red.js +++ b/red/red.js @@ -43,7 +43,9 @@ function checkBuild() { var RED = { init: function(httpServer,userSettings) { - checkBuild(); + if (!userSettings.SKIP_BUILD_CHECK) { + checkBuild(); + } userSettings.version = this.version(); log.init(userSettings); settings.init(userSettings); diff --git a/test/nodes/helper.js b/test/nodes/helper.js index dc85c1961..87c155e4d 100644 --- a/test/nodes/helper.js +++ b/test/nodes/helper.js @@ -86,7 +86,7 @@ module.exports = { available: function() { return false; } }; - + var red = {}; for (var i in RED) { if (RED.hasOwnProperty(i) && !/^(init|start|stop)$/.test(i)) { @@ -94,11 +94,11 @@ module.exports = { Object.defineProperty(red,i,propDescriptor); } } - + red["_"] = function(messageId) { return messageId; }; - + redNodes.init(settings, storage); credentials.init(storage,express()); RED.nodes.registerType("helper", helperNode); @@ -138,6 +138,7 @@ module.exports = { startServer: function(done) { server = http.createServer(function(req,res){app(req,res);}); RED.init(server, { + SKIP_BUILD_CHECK: true, logging:{console:{level:'off'}} }); server.listen(listenPort, address);