From 5d1dd0b67c6a61868e0b998bcc9306852ec32965 Mon Sep 17 00:00:00 2001 From: Jiachi Liu Date: Sun, 15 Aug 2021 18:29:01 +0800 Subject: [PATCH] add test --- test/acceptance/ReactRefreshLogBox.dev.test.js | 10 ++++++++++ test/integration/link-ref/pages/class.js | 1 + 2 files changed, 11 insertions(+) diff --git a/test/acceptance/ReactRefreshLogBox.dev.test.js b/test/acceptance/ReactRefreshLogBox.dev.test.js index 5256e3c707c8087..be8482a140c9d40 100644 --- a/test/acceptance/ReactRefreshLogBox.dev.test.js +++ b/test/acceptance/ReactRefreshLogBox.dev.test.js @@ -1130,6 +1130,16 @@ test(' with multiple children', async () => { expect(await session.getRedboxDescription()).toMatchInlineSnapshot( `"Error: Multiple children were passed to 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() }) diff --git a/test/integration/link-ref/pages/class.js b/test/integration/link-ref/pages/class.js index 3c0968cdd513361..81b71bcdd0c9fb7 100644 --- a/test/integration/link-ref/pages/class.js +++ b/test/integration/link-ref/pages/class.js @@ -10,5 +10,6 @@ class MyLink extends React.Component { export default () => ( + no )