mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-28 22:08:54 -04:00
Remove duplicate test and clean up code.
This commit is contained in:
parent
2324fbc565
commit
7a3448712b
1 changed files with 5 additions and 25 deletions
|
@ -164,27 +164,7 @@ test('After simplifying a path using #simplify(), the path should stay fullySele
|
|||
var path = new Path();
|
||||
for (var i = 0; i < 30; i++) {
|
||||
path.add(i * 10, 10);
|
||||
};
|
||||
path.fullySelected = true;
|
||||
equals(function() {
|
||||
return path.selected;
|
||||
}, true);
|
||||
|
||||
path.simplify();
|
||||
|
||||
equals(function() {
|
||||
return path.selected;
|
||||
}, true);
|
||||
equals(function() {
|
||||
return path.fullySelected;
|
||||
}, true);
|
||||
});
|
||||
|
||||
test('After simplifying a path using #simplify(), the path should stay fullySelected', function() {
|
||||
var path = new Path();
|
||||
for (var i = 0; i < 30; i++) {
|
||||
path.add(i * 10, 10);
|
||||
};
|
||||
}
|
||||
path.fullySelected = true;
|
||||
equals(function() {
|
||||
return path.selected;
|
||||
|
@ -206,7 +186,7 @@ test('After cloning a selected item, it should be added to the Project#selectedI
|
|||
var copy = path.clone();
|
||||
|
||||
equals(function() {
|
||||
return paper.project.selectedItems.length
|
||||
return paper.project.selectedItems.length;
|
||||
}, 2);
|
||||
});
|
||||
|
||||
|
@ -214,7 +194,7 @@ test('After simplifying a path using #simplify(), the path should stay selected'
|
|||
var path = new Path();
|
||||
for (var i = 0; i < 30; i++) {
|
||||
path.add(i * 10, (i % 2 ? 20 : 40));
|
||||
};
|
||||
}
|
||||
path.selected = true;
|
||||
path.simplify();
|
||||
equals(function() {
|
||||
|
@ -226,7 +206,7 @@ test('After smoothing a path using #smooth(), the path should stay fullySelected
|
|||
var path = new Path();
|
||||
for (var i = 0; i < 30; i++) {
|
||||
path.add(i * 10, (i % 2 ? 20 : 40));
|
||||
};
|
||||
}
|
||||
path.fullySelected = true;
|
||||
path.smooth();
|
||||
equals(function() {
|
||||
|
@ -238,7 +218,7 @@ test('After smoothing a path using #smooth(), the path should stay selected', fu
|
|||
var path = new Path();
|
||||
for (var i = 0; i < 30; i++) {
|
||||
path.add(i * 10, (i % 2 ? 20 : 40));
|
||||
};
|
||||
}
|
||||
path.selected = true;
|
||||
path.smooth();
|
||||
equals(function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue