Skip to content

Commit 3d516e4

Browse files
committed
test: fixed broken image test
1 parent 6da578a commit 3d516e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cypress/integration/default/images.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ describe('next/images', () => {
2828
})
2929

3030
it('should show throw if an image is not on the domains or remotePatterns allowlist', () => {
31-
cy.request('/broken-image').then((response) => {
32-
expect(response.status).to.eq(500)
31+
cy.request({ url: '/broken-image', failOnStatusCode: false }).then((response) => {
32+
expect(response.status).to.be.eq(500)
3333
expect(response.body).to.include(
34-
'hostname "broken-domain" is not configured under images in your `next.config.js`',
34+
`Invalid src prop (https://broken-domain/netlify/next-runtime/main/next-on-netlify.png)`,
3535
)
3636
})
3737
})

0 commit comments

Comments
 (0)