Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Aug 15, 2021
1 parent 020ad64 commit 50a28c6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/acceptance/ReactRefreshLogBox.dev.test.js
Expand Up @@ -1130,6 +1130,16 @@ test('<Link> with multiple children', async () => {
expect(await session.getRedboxDescription()).toMatchInlineSnapshot(
`"Error: Multiple children were passed to <Link> with \`href\` of \`/\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children"`
)
expect(
await session.evaluate(
() =>
document
.querySelector('body > nextjs-portal')
.shadowRoot.querySelector(
'#nextjs__container_errors_desc a:nth-of-type(1)'
).href
)
).toMatch('https://nextjs.org/docs/messages/link-multiple-children')

await cleanup()
})
Expand Down

0 comments on commit 50a28c6

Please sign in to comment.