diff --git a/test/unit/canvas_static.js b/test/unit/canvas_static.js index d6399690..c11f084c 100644 --- a/test/unit/canvas_static.js +++ b/test/unit/canvas_static.js @@ -83,7 +83,11 @@ 'filters': [], 'fillRule': 'nonzero', 'globalCompositeOperation': 'source-over', - 'transformMatrix': null + 'transformMatrix': null, + 'crossOrigin': '', + 'alignX': 'none', + 'alignY': 'none', + 'meetOrSlice': 'meet' }; function _createImageElement() { diff --git a/test/unit/image.js b/test/unit/image.js index 70375a15..592043b1 100644 --- a/test/unit/image.js +++ b/test/unit/image.js @@ -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');