Fix for orientation values 1-8

This commit is contained in:
John Tobin
2016-03-25 18:29:53 -07:00
committed by Lovell Fuller
parent c66495b66c
commit ebfc897bcf
3 changed files with 10 additions and 5 deletions

View File

@@ -337,9 +337,14 @@ describe('Image metadata', function() {
sharp().withMetadata({orientation: -1});
});
});
it('Zero orientation', function () {
assert.throws(function () {
sharp().withMetadata({ orientation: 0 });
});
});
it('Too large orientation', function() {
assert.throws(function() {
sharp().withMetadata({orientation: 8});
sharp().withMetadata({orientation: 9});
});
});
});