mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-14 00:33:09 +00:00
Fix tests
This commit is contained in:
parent
614878d133
commit
bd09021b3b
2 changed files with 34 additions and 2 deletions
|
|
@ -83,7 +83,11 @@
|
|||
'filters': [],
|
||||
'fillRule': 'nonzero',
|
||||
'globalCompositeOperation': 'source-over',
|
||||
'transformMatrix': null
|
||||
'transformMatrix': null,
|
||||
'crossOrigin': '',
|
||||
'alignX': 'none',
|
||||
'alignY': 'none',
|
||||
'meetOrSlice': 'meet'
|
||||
};
|
||||
|
||||
function _createImageElement() {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,11 @@
|
|||
'filters': [],
|
||||
'fillRule': 'nonzero',
|
||||
'globalCompositeOperation': 'source-over',
|
||||
'transformMatrix': null
|
||||
'transformMatrix': null,
|
||||
'crossOrigin': '',
|
||||
'alignX': 'none',
|
||||
'alignY': 'none',
|
||||
'meetOrSlice': 'meet'
|
||||
};
|
||||
|
||||
function _createImageElement() {
|
||||
|
|
@ -133,6 +137,30 @@
|
|||
});
|
||||
});
|
||||
|
||||
// asyncTest('toObject without default values', function() {
|
||||
// createImageObject(function(image) {
|
||||
|
||||
// image.includeDefaultValues = false;
|
||||
|
||||
// var object = image.toObject();
|
||||
|
||||
// // workaround for node-canvas sometimes producing images with width/height and sometimes not
|
||||
// if (object.width === 0) {
|
||||
// object.width = IMG_WIDTH;
|
||||
// }
|
||||
// if (object.height === 0) {
|
||||
// object.height = IMG_HEIGHT;
|
||||
// }
|
||||
// deepEqual(object, {
|
||||
// type: 'image',
|
||||
// // why the hell deepEqual fail [] == [] check?!
|
||||
// filters: [],
|
||||
// crossOrigin: ''
|
||||
// });
|
||||
// start();
|
||||
// });
|
||||
// });
|
||||
|
||||
asyncTest('toString', function() {
|
||||
createImageObject(function(image) {
|
||||
ok(typeof image.toString == 'function');
|
||||
|
|
|
|||
Loading…
Reference in a new issue