Update unit tests

This commit is contained in:
Nick O'Leary
2015-01-10 22:09:37 +00:00
parent afb5e8cbce
commit a5afc258b1
10 changed files with 342 additions and 336 deletions

View File

@@ -207,12 +207,12 @@ function diffNodeConfigs(oldNode,newNode) {
var subflowInstanceRE = /^subflow:(.+)$/;
function Flow(config) {
this.activeNodes = {};
this.subflowInstanceNodes = {};
this.parseConfig(config);
}
Flow.prototype.parseConfig = function(config) {
@@ -385,6 +385,14 @@ Flow.prototype.getFlow = function() {
return this.config;
}
Flow.prototype.eachNode = function(callback) {
for (var id in this.activeNodes) {
if (this.activeNodes.hasOwnProperty(id)) {
callback(this.activeNodes[id]);
}
}
}
Flow.prototype.applyConfig = function(config,type) {
var diff = this.diffFlow(config);
//console.log(diff);