mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-28 22:08:54 -04:00
Improve unit test for new Path.Constructor({ insert: false })
This commit is contained in:
parent
c3333cc500
commit
2290ec0ff6
2 changed files with 16 additions and 4 deletions
|
@ -131,7 +131,19 @@ test('new Path.Line({ from: from, to: to })', function() {
|
|||
equals(path.segments.toString(), '{ point: { x: 20, y: 20 } },{ point: { x: 40, y: 40 } }');
|
||||
});
|
||||
|
||||
test('new Path.Line({insert: false, from:[50, 50], to:[100, 100]})', function() {
|
||||
var path = new Path.Line({insert: false, from:[50, 50], to:[100, 100]});
|
||||
equals(path.insert === false, false);
|
||||
test('new Path.Line({ insert: false })', function() {
|
||||
var path = new Path.Line({
|
||||
from:[50, 50],
|
||||
to:[100, 100],
|
||||
insert: false
|
||||
});
|
||||
equals(function() {
|
||||
return typeof path.insert;
|
||||
}, 'function');
|
||||
equals(function() {
|
||||
return path.parent;
|
||||
}, null);
|
||||
equals(function() {
|
||||
return path.isInserted();
|
||||
}, false);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue