mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Add failing test where cloning a linked size throws an error.
This commit is contained in:
parent
bda60f1f90
commit
115d12f6ce
1 changed files with 14 additions and 0 deletions
|
@ -440,4 +440,18 @@ test('Changing item#position.x', function() {
|
|||
var path = new Path.Circle(new Point(50, 50), 50);
|
||||
path.position.x += 5;
|
||||
equals(path.position.toString(), '{ x: 55, y: 50 }', 'path.position.x += 5');
|
||||
});
|
||||
|
||||
test('Cloning a linked size', function() {
|
||||
var path = new Path([40, 75], [140, 75]);
|
||||
var error = null;
|
||||
try {
|
||||
var cloneSize = path.bounds.size.clone();
|
||||
} catch (e) {
|
||||
error = e;
|
||||
}
|
||||
var description = 'Cloning a linked size should not throw an error';
|
||||
if (error)
|
||||
description += ': ' + error;
|
||||
equals(error == null, true, description);
|
||||
});
|
Loading…
Reference in a new issue