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:
parent
083d54b008
commit
88dc202db2
@ -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") {
|
||||
|
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user