1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add flag to disable build check for tests

This commit is contained in:
Nick O'Leary 2015-07-22 11:41:58 +01:00
parent a76e4fede1
commit eb57089f06
2 changed files with 7 additions and 4 deletions

View File

@ -43,7 +43,9 @@ function checkBuild() {
var RED = { var RED = {
init: function(httpServer,userSettings) { init: function(httpServer,userSettings) {
checkBuild(); if (!userSettings.SKIP_BUILD_CHECK) {
checkBuild();
}
userSettings.version = this.version(); userSettings.version = this.version();
log.init(userSettings); log.init(userSettings);
settings.init(userSettings); settings.init(userSettings);

View File

@ -86,7 +86,7 @@ module.exports = {
available: function() { return false; } available: function() { return false; }
}; };
var red = {}; var red = {};
for (var i in RED) { for (var i in RED) {
if (RED.hasOwnProperty(i) && !/^(init|start|stop)$/.test(i)) { if (RED.hasOwnProperty(i) && !/^(init|start|stop)$/.test(i)) {
@ -94,11 +94,11 @@ module.exports = {
Object.defineProperty(red,i,propDescriptor); Object.defineProperty(red,i,propDescriptor);
} }
} }
red["_"] = function(messageId) { red["_"] = function(messageId) {
return messageId; return messageId;
}; };
redNodes.init(settings, storage); redNodes.init(settings, storage);
credentials.init(storage,express()); credentials.init(storage,express());
RED.nodes.registerType("helper", helperNode); RED.nodes.registerType("helper", helperNode);
@ -138,6 +138,7 @@ module.exports = {
startServer: function(done) { startServer: function(done) {
server = http.createServer(function(req,res){app(req,res);}); server = http.createServer(function(req,res){app(req,res);});
RED.init(server, { RED.init(server, {
SKIP_BUILD_CHECK: true,
logging:{console:{level:'off'}} logging:{console:{level:'off'}}
}); });
server.listen(listenPort, address); server.listen(listenPort, address);