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

Fix node test helper for api/runtime changes

This commit is contained in:
Nick O'Leary 2015-11-20 23:01:13 +00:00
parent 083d54b008
commit 88dc202db2
2 changed files with 2 additions and 17 deletions

View File

@ -238,27 +238,12 @@ function loadNodeSet(node) {
if (RED.hasOwnProperty(i) && !/^(init|start|stop)$/.test(i)) {
var propDescriptor = Object.getOwnPropertyDescriptor(RED,i);
Object.defineProperty(red,i,propDescriptor);
if (typeof RED[i] === 'function') {
console.log(i+"()");
} else {
for (var j in RED[i]) {
if (typeof RED[i][j] === 'function') {
console.log(i+"."+j+"()");
} else if (typeof RED[i][j] === 'number') {
console.log(i+"."+j+" #");
} else if (typeof RED[i][j] === 'string') {
console.log(i+"."+j+" $");
} else {
console.log(i+"."+j+" "+typeof RED[i][j]);
}
}
}
}
}
red["_"] = function() {
var args = Array.prototype.slice.call(arguments, 0);
args[0] = node.namespace+":"+args[0];
return i18n._.apply(null,args);
return runtime.i18n._.apply(null,args);
}
var promise = r(red);
if (promise != null && typeof promise.then === "function") {

View File

@ -99,7 +99,7 @@ module.exports = {
return messageId;
};
redNodes.init(settings, storage);
redNodes.init({settings:settings, storage:storage});
credentials.init(storage,express());
RED.nodes.registerType("helper", helperNode);
if (Array.isArray(testNode)) {