We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f8cd0d commit 4846049Copy full SHA for 4846049
tests/magick-image/chop.spec.ts
@@ -9,12 +9,14 @@ import { TestFiles } from '@test/test-files';
9
describe('MagickImage#chop', () => {
10
it('should remove part of the image', () => {
11
TestFiles.Images.Builtin.logo.use(image => {
12
- image.chop(new MagickGeometry(100, 100, 100, 100));
+ image.chop(new MagickGeometry(75, 100, 150, 25));
13
14
- expect(image).toHavePixelWithColor(300, 99, '#fff');
15
- expect(image).toHavePixelWithColor(300, 100, '#f79868ff');
16
- expect(image).toHavePixelWithColor(406, 99, '#333636ff');
17
- expect(image).toHavePixelWithColor(406, 100, '#fff');
+ expect(image.width).toBe(490);
+ expect(image.height).toBe(455);
+ expect(image).toHavePixelWithColor(122, 99, '#fff');
+ expect(image).toHavePixelWithColor(122, 100, '#f5ee36ff');
18
+ expect(image).toHavePixelWithColor(280, 99, '#fff');
19
+ expect(image).toHavePixelWithColor(280, 100, '#223e92ff');
20
});
21
22
0 commit comments