mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-01 02:24:42 +00:00
Fix unit tests
This commit is contained in:
parent
4b1c58ca6e
commit
448dfad97e
1 changed files with 12 additions and 5 deletions
|
|
@ -476,21 +476,28 @@
|
|||
asyncTest('fabric.util.groupSVGElements', function() {
|
||||
ok(typeof fabric.util.groupSVGElements == 'function');
|
||||
|
||||
stop();
|
||||
|
||||
var group1, group2;
|
||||
var group1;
|
||||
fabric.loadSVGFromString(SVG_WITH_1_ELEMENT, function(objects, options) {
|
||||
group1 = fabric.util.groupSVGElements(objects, options);
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
ok(group1 instanceof fabric.Polygon);
|
||||
start();
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
asyncTest('fabric.util.groupSVGElements #2', function() {
|
||||
|
||||
var group2;
|
||||
fabric.loadSVGFromString(SVG_WITH_2_ELEMENTS, function(objects, options) {
|
||||
group2 = fabric.util.groupSVGElements(objects, options);
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
ok(group1 instanceof fabric.Polygon);
|
||||
ok(group2 instanceof fabric.PathGroup);
|
||||
start();
|
||||
}, 1000);
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
test('Array.prototype.indexOf', function() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue