From 1bafc080810177e3fb93418d59959ec0b18dc183 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Thu, 15 Apr 2021 11:49:17 +0200 Subject: [PATCH] Add check for exact error --- test/acceptance/ReactRefreshLogBox.dev.test.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/acceptance/ReactRefreshLogBox.dev.test.js b/test/acceptance/ReactRefreshLogBox.dev.test.js index fb8e6b47cb9e7..5dfbfa5daa307 100644 --- a/test/acceptance/ReactRefreshLogBox.dev.test.js +++ b/test/acceptance/ReactRefreshLogBox.dev.test.js @@ -1278,6 +1278,16 @@ test('_app top level error shows logbox', async () => { ]) ) expect(await session.hasRedbox(true)).toBe(true) + expect(await session.getRedboxSource()).toMatchInlineSnapshot(` + "pages/_app.js (2:16) @ eval + + 1 | + > 2 | throw new Error(\\"test\\"); + | ^ + 3 | function MyApp({ Component, pageProps }) { + 4 | return ; + 5 | }" + `) await session.patch( 'pages/_app.js',