mirror of
https://github.com/lovell/sharp.git
synced 2025-07-12 20:10:13 +02:00
Add a unit test for extract area out of bounds (#498)
This commit is contained in:
parent
8dd554b935
commit
673d8278b5
@ -175,5 +175,14 @@ describe('Partial image extraction', function() {
|
||||
sharp(fixtures.inputJpg).extract({ left: 10, top: 10, width: 10, height: null });
|
||||
});
|
||||
});
|
||||
|
||||
it('Bad image area', function(done) {
|
||||
sharp(fixtures.inputJpg)
|
||||
.extract({ left: 3000, top: 10, width: 10, height: 10 })
|
||||
.toBuffer(function(err) {
|
||||
assert(err instanceof Error);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user