diff --git a/test/lib/helpers.js b/test/lib/helpers.js index 18955bc8..785532ba 100644 --- a/test/lib/helpers.js +++ b/test/lib/helpers.js @@ -273,22 +273,19 @@ function compareItems(item, item2, checkIdentity) { 'Compare Item#matrix'); } - if (item2.segments) { - if (checkIdentity) { - equals(function() { - return item.segments != item2.segments; - }, true); - } - equals(item.segments.toString(), item2.segments.toString(), - 'Compare Item#segments'); - } - // Path specific + + // PathItem specific if (item instanceof PathItem) { equals(function() { return item.clockwise == item2.clockwise; }, true); } + + // Path specific + if (item2 instanceof Path) { + compareSegmentLists(item.segments, item2.segments, checkIdentity); + } // Group specific if (item instanceof Group) {