mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Improve error for unsupported multi-page rotation #3940
This commit is contained in:
@@ -353,6 +353,21 @@ describe('Rotation', function () {
|
||||
)
|
||||
);
|
||||
|
||||
it('Animated image rotate 180', () =>
|
||||
assert.doesNotReject(() => sharp(fixtures.inputGifAnimated, { animated: true })
|
||||
.rotate(180)
|
||||
.toBuffer()
|
||||
)
|
||||
);
|
||||
|
||||
it('Animated image rotate non-180 rejects', () =>
|
||||
assert.rejects(() => sharp(fixtures.inputGifAnimated, { animated: true })
|
||||
.rotate(90)
|
||||
.toBuffer(),
|
||||
/Rotate is not supported for multi-page images/
|
||||
)
|
||||
);
|
||||
|
||||
it('Multiple rotate emits warning', () => {
|
||||
let warningMessage = '';
|
||||
const s = sharp();
|
||||
|
||||
Reference in New Issue
Block a user