aboutsummaryrefslogtreecommitdiffstats
path: root/library/cropperjs/test/events/crop.js
blob: 1f769cf6010b176ff2acf3260c8fd64bc6799398 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
QUnit.test('events#crop', function (assert) {
  var done = assert.async();
  var util = window.Util;
  var image = util.createImage();

  assert.expect(7);

  image.addEventListener('crop', function (e) {
    assert.ok(util.isNumber(e.detail.x));
    assert.ok(util.isNumber(e.detail.y));
    assert.ok(util.isNumber(e.detail.width));
    assert.ok(util.isNumber(e.detail.height));
    assert.ok(util.isNumber(e.detail.rotate));
    assert.ok(util.isNumber(e.detail.scaleX));
    assert.ok(util.isNumber(e.detail.scaleY));

    done();
  });

  return new Cropper(image);
});