mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -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() {
|
equals(function() {
|
||||||
return item.nextSibling == copy;
|
return item.nextSibling == copy;
|
||||||
}, true);
|
}, true);
|
||||||
|
if (item.name) {
|
||||||
|
equals(function() {
|
||||||
|
return copy.parent.children[copy.name] == copy;
|
||||||
|
}, true);
|
||||||
|
}
|
||||||
compareItems(item, copy);
|
compareItems(item, copy);
|
||||||
// Remove the cloned item to restore the document:
|
// Remove the cloned item to restore the document:
|
||||||
copy.remove();
|
copy.remove();
|
||||||
|
|
Loading…
Reference in a new issue