diff options
Diffstat (limited to 'library/cropperjs/test/specs/Cropper.spec.js')
-rw-r--r-- | library/cropperjs/test/specs/Cropper.spec.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/library/cropperjs/test/specs/Cropper.spec.js b/library/cropperjs/test/specs/Cropper.spec.js new file mode 100644 index 000000000..ed20ad1fd --- /dev/null +++ b/library/cropperjs/test/specs/Cropper.spec.js @@ -0,0 +1,11 @@ +describe('Cropper', () => { + it('should be a class (function)', () => { + expect(Cropper).to.be.a('function'); + }); + + it('should throw error when the first argument is not an element', () => { + expect(() => { + new Cropper(document); + }).to.throw('The first argument is required and must be an <img> or <canvas> element.'); + }); +}); |