aboutsummaryrefslogtreecommitdiffstats
path: root/library/cropperjs/test/specs/methods/noConflict.spec.js
blob: d5c1c43d88d9cd6b9e6a56653f7ca46d8cef1143 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
describe('noConflict', () => {
  it('should be a static method', () => {
    expect(Cropper.noConflict).to.be.a('function');
  });

  it('should return the Cropper class itself', () => {
    const { Cropper } = window;
    const ImageCropper = Cropper.noConflict();

    expect(ImageCropper).to.equal(Cropper);
    expect(window.Cropper).to.be.undefined;

    // Reverts it for the rest test suites
    window.Cropper = ImageCropper;
  });
});