Improve test assertions (#65285)

Closes NEXT-3286
This commit is contained in:
Sebastian Silbermann 2024-05-02 22:40:08 +02:00 committed by GitHub
parent 2bbeab878c
commit 01826678fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -93,13 +93,16 @@ describe('Auto Export', () => {
it('should include error link when hydration error does occur', async () => {
const browser = await webdriver(appPort, '/post-1/hydrate-error')
const logs = await browser.log()
expect(
logs.some((log) =>
log.message.includes(
'See more info here: https://nextjs.org/docs/messages/react-hydration-error'
)
)
).toBe(true)
expect(logs).toEqual(
expect.arrayContaining([
{
message: expect.stringContaining(
'See more info here: https://nextjs.org/docs/messages/react-hydration-error'
),
source: 'error',
},
])
)
})
})
})