aboutsummaryrefslogblamecommitdiffstats
path: root/library/cropperjs/test/methods/moveTo.js
blob: e8bf0eebdc9911e736d5d6ba096101a6f35075fd (plain) (tree)


















                                                            
QUnit.test('methods#moveTo', function (assert) {
  var done = assert.async();
  var util = window.Util;
  var image = util.createImage();

  assert.expect(2);

  return new Cropper(image, {
    ready: function () {
      var cropper = this.cropper;
      var canvasData = cropper.moveTo(0, 0).getCanvasData();

      assert.strictEqual(canvasData.left, 0);
      assert.strictEqual(canvasData.top, 0);

      done();
    }
  });
});