mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Ensure ops without multi-page support reject (#3010)
This commit is contained in:
@@ -120,6 +120,14 @@ describe('Trim borders', function () {
|
||||
)
|
||||
);
|
||||
|
||||
it('Animated image rejects', () =>
|
||||
assert.rejects(() => sharp(fixtures.inputGifAnimated, { animated: true })
|
||||
.trim()
|
||||
.toBuffer(),
|
||||
/Trim is not supported for multi-page images/
|
||||
)
|
||||
);
|
||||
|
||||
describe('Invalid thresholds', function () {
|
||||
[-1, 'fail', {}].forEach(function (threshold) {
|
||||
it(JSON.stringify(threshold), function () {
|
||||
|
||||
Reference in New Issue
Block a user