Skip to content

Commit 4846049

Browse files
committed
Added extra asserts and improved test.
1 parent 5f8cd0d commit 4846049

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/magick-image/chop.spec.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ import { TestFiles } from '@test/test-files';
99
describe('MagickImage#chop', () => {
1010
it('should remove part of the image', () => {
1111
TestFiles.Images.Builtin.logo.use(image => {
12-
image.chop(new MagickGeometry(100, 100, 100, 100));
12+
image.chop(new MagickGeometry(75, 100, 150, 25));
1313

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');
14+
expect(image.width).toBe(490);
15+
expect(image.height).toBe(455);
16+
expect(image).toHavePixelWithColor(122, 99, '#fff');
17+
expect(image).toHavePixelWithColor(122, 100, '#f5ee36ff');
18+
expect(image).toHavePixelWithColor(280, 99, '#fff');
19+
expect(image).toHavePixelWithColor(280, 100, '#223e92ff');
1820
});
1921
});
2022
});

0 commit comments

Comments
 (0)