mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Add test for Document#activate()
This commit is contained in:
parent
c0e2101c32
commit
b261fafd32
2 changed files with 11 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
|||
<script type="text/javascript" src="tests/Point.js"></script>
|
||||
<script type="text/javascript" src="tests/Size.js"></script>
|
||||
<script type="text/javascript" src="tests/Rectangle.js"></script>
|
||||
<script type="text/javascript" src="tests/Document.js"></script>
|
||||
<script type="text/javascript" src="tests/Item.js"></script>
|
||||
<script type="text/javascript" src="tests/Segment.js"></script>
|
||||
<script type="text/javascript" src="tests/Path.js"></script>
|
||||
|
|
10
test/tests/Document.js
Normal file
10
test/tests/Document.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
module('Document');
|
||||
|
||||
test('activate()', function() {
|
||||
var doc = new Doc();
|
||||
var secondDoc = new Doc();
|
||||
doc.activate();
|
||||
var path = new Path();
|
||||
equals(doc.activeLayer.children[0] == path, true);
|
||||
equals(secondDoc.activeLayer.children.length == 0, true);
|
||||
});
|
Loading…
Reference in a new issue