diff --git a/test/unit/image.test.ts b/test/unit/image.test.ts index 329c1fbe2..f8559d3bb 100644 --- a/test/unit/image.test.ts +++ b/test/unit/image.test.ts @@ -54,4 +54,16 @@ describe('Renders simple image', () => { }) expect(img.html()).toMatchInlineSnapshot('""') }) + + it('correctly sets crop', () => { + const img = mount(NuxtImg, { + propsData: { + src: '/image.png', + width: 1000, + height: 2000, + sizes: 'xs:100vw sm:100vw md:300px lg:350px xl:350px 2xl:350px' + } + }) + expect(img.html()).toMatchInlineSnapshot('""') + }) })