aboutsummaryrefslogtreecommitdiffstats
path: root/library/cropperjs/test/options/crop.js
blob: a4b48585e94ca165a378d5c427086ac56bbdb878 (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('options#crop', function (assert) {
  var done = assert.async();
  var util = window.Util;
  var image = util.createImage();

  assert.expect(7);

  return new Cropper(image, {
    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();
    }
  });
});