Upgrade to node 12
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
QUnit.test('crop image', function(assert) {
|
||||
var done = assert.async();
|
||||
var editor = new ImageEditor('canvas');
|
||||
var editor = new ImageEditor('canvas', {type: 'photo-wallpaper'});
|
||||
editor.loadImage('fixtures/dog.jpg', function() {
|
||||
editor.crop(400, 200, 'cm');
|
||||
var data = editor.canvas.getImageData().getData();
|
||||
@@ -27,4 +27,18 @@
|
||||
});
|
||||
});
|
||||
|
||||
QUnit.test('repeating wallpaper has x and y set to 0', function(assert) {
|
||||
var done = assert.async();
|
||||
var editor = new ImageEditor('canvas', {type: 'wallpaper'});
|
||||
editor.loadImage('fixtures/dog.jpg', function() {
|
||||
editor.crop(400, 200, 'cm');
|
||||
var data = editor.canvas.getImageData().getData();
|
||||
assert.strictEqual(data.width, 400, 'sets image width');
|
||||
assert.strictEqual(data.height, 200, 'sets image height');
|
||||
assert.strictEqual(data.x, 0, 'sets crop x');
|
||||
assert.strictEqual(data.y, 0, 'sets crop y');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user