Adding capability to the test helper to load more than one node at once

This commit is contained in:
hbeeken 2014-10-22 11:29:54 +01:00
parent 53a9a5fe93
commit 1e7ce2cfe7
1 changed files with 7 additions and 1 deletions

View File

@ -77,7 +77,13 @@ module.exports = {
redNodes.init(settings, storage);
credentials.init(storage);
RED.nodes.registerType("helper", helperNode);
testNode(RED);
if (Array.isArray(testNode)) {
for (var i = 0; i < testNode.length; i++) {
testNode[i](RED);
}
} else {
testNode(RED);
}
flows.load().then(function() {
should.deepEqual(testFlows, flows.getFlows());
cb();