diff --git a/test/lib/helpers.js b/test/lib/helpers.js index 3704b0dd..3a4af085 100644 --- a/test/lib/helpers.js +++ b/test/lib/helpers.js @@ -106,6 +106,11 @@ function cloneAndCompare(item) { equals(function() { return item.nextSibling == copy; }, true); + if (item.name) { + equals(function() { + return copy.parent.children[copy.name] == copy; + }, true); + } compareItems(item, copy); // Remove the cloned item to restore the document: copy.remove();