mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
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.
This commit is contained in:
parent
1cdaa3a86b
commit
e386ce179a
1 changed files with 5 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue