Clean up some TreeProcessor stuff.

- Properly segment parents of segmented suites
This commit is contained in:
Gregg Van Hove
2015-03-03 13:14:20 -08:00
parent 22f58c0049
commit dc652cfb05
2 changed files with 78 additions and 10 deletions

View File

@@ -117,7 +117,7 @@ getJasmineRequireObj().TreeProcessor = function() {
minIndex = childSegment.min;
if (isSegmentBoundary(minIndex)) {
currentSegment = {index: result.length, owner: node, nodes: [], min: defaultMin, max: defaultMin};
currentSegment = {index: result.length, owner: node, nodes: [], min: defaultMin, max: defaultMax};
result.push(currentSegment);
}
@@ -130,11 +130,11 @@ getJasmineRequireObj().TreeProcessor = function() {
nodeStats.segments = result;
}
function orderChildSegments(array) {
function orderChildSegments(children) {
var result = [];
for (var i = 0; i < array.length; i++) {
var child = array[i],
for (var i = 0; i < children.length; i++) {
var child = children[i],
segments = stats[child.id].segments;
for (var j = 0; j < segments.length; j++) {