Add WebP availability check to test added in a5bd68e

This commit is contained in:
Lovell Fuller 2016-07-21 15:55:34 +01:00
parent a5bd68ef8c
commit 9ddc817a09

View File

@ -128,6 +128,7 @@ describe('Resize dimensions', function() {
done(); done();
}); });
if (sharp.format.webp.output.buffer) {
it('WebP shrink-on-load rounds to zero, ensure recalculation is correct', function(done) { it('WebP shrink-on-load rounds to zero, ensure recalculation is correct', function(done) {
sharp(fixtures.inputJpg) sharp(fixtures.inputJpg)
.resize(1080, 607) .resize(1080, 607)
@ -148,6 +149,7 @@ describe('Resize dimensions', function() {
}); });
}); });
}); });
}
if (sharp.format.tiff.input.file) { if (sharp.format.tiff.input.file) {
it('TIFF embed known to cause rounding errors', function(done) { it('TIFF embed known to cause rounding errors', function(done) {