Allow WebP encoding effort of 0 (#3261)

This commit is contained in:
AlexanderTheGrey
2022-06-17 02:22:51 -05:00
committed by GitHub
parent b10d8f89ca
commit 4662527a17
2 changed files with 7 additions and 1 deletions

View File

@@ -133,6 +133,12 @@ describe('WebP', function () {
});
});
it('should set effort to 0', () => {
const effort = sharp().webp({ effort: 0 }).options.webpEffort;
assert.strictEqual(effort, 0);
});
it('invalid loop throws', () => {
assert.throws(() => {
sharp().webp({ loop: -1 });