Skip to content

Commit d1493ab

Browse files
committed
Add test case for pull request blueimp#83.
1 parent b1dac4f commit d1493ab

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

test/test.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,10 +365,10 @@
365365

366366
it('Should adjust constraints to new coordinates', function (done) {
367367
expect(loadImage(blobGIF, function (img) {
368-
expect(img.width).to.equal(60)
369-
expect(img.height).to.equal(80)
368+
expect(img.width).to.equal(30)
369+
expect(img.height).to.equal(40)
370370
done()
371-
}, {orientation: 6, maxWidth: 60, maxHeight: 80})).to.be.ok
371+
}, {orientation: 6, maxWidth: 30, maxHeight: 40})).to.be.ok
372372
})
373373

374374
it('Should adjust left and top to new coordinates', function (done) {
@@ -449,6 +449,14 @@
449449
done()
450450
}, {orientation: true})).to.be.ok
451451
})
452+
453+
it('Should adjust constraints based on the exif orientation value', function (done) {
454+
expect(loadImage(blobJPEG, function (img) {
455+
expect(img.width).to.equal(10)
456+
expect(img.height).to.equal(20)
457+
done()
458+
}, {orientation: true, minWidth: 10, minHeight: 20})).to.be.ok
459+
})
452460
})
453461

454462
describe('Canvas', function () {

0 commit comments

Comments
 (0)