We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent defaa98 commit 634f1c9Copy full SHA for 634f1c9
test/unit/utils-test.js
@@ -107,5 +107,17 @@ describe('Common utils', function () {
107
var result = utils.createOutputObject(root);
108
result.should.eql(expected);
109
});
110
+
111
+ it('should not fail on referential loop', function() {
112
+ var root = new Resource('http://example.com', 'index.html');
113
+ var child1 = root.createChild('http://child-one.com', 'child1.html');
114
+ var child2 = root.createChild('http://child-two.com', 'child2.html');
115
+ // create referential loop
116
+ var rootCopy = child1.createChild('http://example.com');
117
+ child1.updateChild(rootCopy, root);
118
119
+ var result = utils.createOutputObject(root);
120
+ result.should.be.not.empty();
121
+ });
122
123
0 commit comments