mirror of
https://github.com/lovell/sharp.git
synced 2025-07-12 20:10:13 +02:00
Tests: add coverage for tiff quality option
This commit is contained in:
parent
e7413ea1e5
commit
8e04e4b07f
@ -85,6 +85,19 @@ describe('TIFF', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('Increasing TIFF quality increases file size', () =>
|
||||
sharp(fixtures.inputJpgWithLandscapeExif1)
|
||||
.tiff({ quality: 40 })
|
||||
.toBuffer()
|
||||
.then(tiff40 => sharp(fixtures.inputJpgWithLandscapeExif1)
|
||||
.tiff({ quality: 90 })
|
||||
.toBuffer()
|
||||
.then(tiff90 =>
|
||||
assert.strictEqual(true, tiff40.length < tiff90.length)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
it('Invalid TIFF quality throws error', function () {
|
||||
assert.throws(function () {
|
||||
sharp().tiff({ quality: 101 });
|
||||
|
Loading…
x
Reference in New Issue
Block a user