mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05: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 } }');
|
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() {
|
test('new Path.Line({ insert: false })', function() {
|
||||||
var path = new Path.Line({insert: false, from:[50, 50], to:[100, 100]});
|
var path = new Path.Line({
|
||||||
equals(path.insert === false, false);
|
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…
Reference in a new issue