mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-28 22:08:54 -04:00
Implement unit test for getItems({ empty: true }).
This commit is contained in:
parent
782bde238c
commit
b1329f1db5
1 changed files with 16 additions and 0 deletions
|
@ -188,3 +188,19 @@ test('Project#getItems() with regex function', function() {
|
|||
return items.length == 2;
|
||||
}, true);
|
||||
});
|
||||
|
||||
test('Project#getItems() empty: true', function() {
|
||||
var layer = new Layer();
|
||||
var empty1 = new Path();
|
||||
var empty2 = new Path();
|
||||
|
||||
equals(function() {
|
||||
return layer.children.length;
|
||||
}, 2);
|
||||
|
||||
equals(function() {
|
||||
return paper.project.getItems({
|
||||
empty: true
|
||||
}).length;
|
||||
}, 2);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue