mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Tests: cloneAndCompare: compare item._parent and item.nextSibling.
This commit is contained in:
parent
6bfec35a2e
commit
b579b9c96c
1 changed files with 6 additions and 0 deletions
|
@ -100,6 +100,12 @@ function compareGradientColors(color1, color2) {
|
|||
|
||||
function cloneAndCompare(item) {
|
||||
var copy = item.clone();
|
||||
equals(function() {
|
||||
return item._parent == copy._parent;
|
||||
}, true);
|
||||
equals(function() {
|
||||
return item.nextSibling == copy;
|
||||
}, true);
|
||||
compareItems(item, copy);
|
||||
// Remove the cloned item to restore the document:
|
||||
copy.remove();
|
||||
|
|
Loading…
Reference in a new issue