From e386ce179a54cf11461cab3908885b2ac987a1e6 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Sat, 21 May 2011 14:05:52 +0200 Subject: [PATCH] Tests: cloneAndCompare: if the item has a name, check that the copy is returned when accessing the children list of its parent by its name. --- test/lib/helpers.js | 5 +++++ 1 file changed, 5 insertions(+) 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();