From b19d5ab3b07d10e8363f0a5b098360748e3b282b Mon Sep 17 00:00:00 2001 From: OJ Kwon <1210596+kwonoj@users.noreply.github.com> Date: Tue, 6 Dec 2022 08:41:12 -0800 Subject: [PATCH] test(snapshot): update snapshot --- .../ReactRefreshLogBox.test.ts.snap | 36 ++++++++++++------ .../ReactRefreshLogBox-app-doc.test.ts.snap | 37 +++++++++++++------ .../ReactRefreshLogBox.test.ts.snap | 36 ++++++++++++------ 3 files changed, 74 insertions(+), 35 deletions(-) diff --git a/test/development/acceptance-app/__snapshots__/ReactRefreshLogBox.test.ts.snap b/test/development/acceptance-app/__snapshots__/ReactRefreshLogBox.test.ts.snap index 8eaa0b7e4007f8e..831fe30c3b32a7d 100644 --- a/test/development/acceptance-app/__snapshots__/ReactRefreshLogBox.test.ts.snap +++ b/test/development/acceptance-app/__snapshots__/ReactRefreshLogBox.test.ts.snap @@ -142,9 +142,12 @@ exports[`ReactRefreshLogBox app syntax > runtime error 2`] = ` "./index.js Error: x Expected '}', got '' - ,---- - 8 | export default function FunctionNamed() { - : ^ + ,-[5:1] + 5 | i++ + 6 | throw Error('no ' + i) + 7 | }, 1000) + 8 | export default function FunctionNamed() { + : ^ \`---- Caused by: @@ -157,9 +160,12 @@ exports[`ReactRefreshLogBox app syntax > runtime error 3`] = ` "./index.js Error: x Expected '}', got '' - ,---- - 8 | export default function FunctionNamed() { - : ^ + ,-[5:1] + 5 | i++ + 6 | throw Error('no ' + i) + 7 | }, 1000) + 8 | export default function FunctionNamed() { + : ^ \`---- Caused by: @@ -172,15 +178,21 @@ exports[`ReactRefreshLogBox app unterminated JSX 1`] = ` "./index.js Error: x Unexpected token. Did you mean \`{'}'}\` or \`}\`? - ,---- - 8 | } - : ^ + ,-[5:1] + 5 |

lol

+ 6 | div + 7 | ) + 8 | } + : ^ + 9 | \`---- x Unexpected eof - ,---- - 9 | - : ^ + ,-[6:1] + 6 | div + 7 | ) + 8 | } + 9 | \`---- Caused by: diff --git a/test/development/acceptance/__snapshots__/ReactRefreshLogBox-app-doc.test.ts.snap b/test/development/acceptance/__snapshots__/ReactRefreshLogBox-app-doc.test.ts.snap index 30ad20c91338a02..8e58bcd0ee23279 100644 --- a/test/development/acceptance/__snapshots__/ReactRefreshLogBox-app-doc.test.ts.snap +++ b/test/development/acceptance/__snapshots__/ReactRefreshLogBox-app-doc.test.ts.snap @@ -4,16 +4,25 @@ exports[`ReactRefreshLogBox _app syntax error shows logbox 1`] = ` "./pages/_app.js Error: x Expression expected - ,---- - 3 | return <; - : ^ + ,-[1:1] + 1 | + 2 | function MyApp({ Component, pageProps }) { + 3 | return <; + : ^ + 4 | } + 5 | export default MyApp + 6 | \`---- - x Unexpected token \`jsx name (Component)\`. Expected this, import, async, function, [ for array literal, { for object literal, @ for decorator, function, class, null, true, false, number, bigint, - | string, regexp, \` for template literal, (, or an identifier - ,---- - 3 | return <; - : ^^^^^^^^^ + x Expression expected + ,-[1:1] + 1 | + 2 | function MyApp({ Component, pageProps }) { + 3 | return <; + : ^^^^^^^^^ + 4 | } + 5 | export default MyApp + 6 | \`---- Caused by: @@ -25,9 +34,15 @@ exports[`ReactRefreshLogBox _document syntax error shows logbox 1`] = ` "./pages/_document.js Error: x Unexpected token \`{\`. Expected identifier, string literal, numeric literal or [ for the computed key - ,---- - 4 | class MyDocument extends Document {{ - : ^ + ,-[1:1] + 1 | + 2 | import Document, { Html, Head, Main, NextScript } from 'next/document' + 3 | + 4 | class MyDocument extends Document {{ + : ^ + 5 | static async getInitialProps(ctx) { + 6 | const initialProps = await Document.getInitialProps(ctx) + 7 | return { ...initialProps } \`---- Caused by: diff --git a/test/development/acceptance/__snapshots__/ReactRefreshLogBox.test.ts.snap b/test/development/acceptance/__snapshots__/ReactRefreshLogBox.test.ts.snap index 6f59ee031abe2f9..700dbdd4018737b 100644 --- a/test/development/acceptance/__snapshots__/ReactRefreshLogBox.test.ts.snap +++ b/test/development/acceptance/__snapshots__/ReactRefreshLogBox.test.ts.snap @@ -142,9 +142,12 @@ exports[`ReactRefreshLogBox syntax > runtime error 2`] = ` "./index.js Error: x Expected '}', got '' - ,---- - 8 | export default function FunctionNamed() { - : ^ + ,-[5:1] + 5 | i++ + 6 | throw Error('no ' + i) + 7 | }, 1000) + 8 | export default function FunctionNamed() { + : ^ \`---- Caused by: @@ -157,9 +160,12 @@ exports[`ReactRefreshLogBox syntax > runtime error 3`] = ` "./index.js Error: x Expected '}', got '' - ,---- - 8 | export default function FunctionNamed() { - : ^ + ,-[5:1] + 5 | i++ + 6 | throw Error('no ' + i) + 7 | }, 1000) + 8 | export default function FunctionNamed() { + : ^ \`---- Caused by: @@ -172,15 +178,21 @@ exports[`ReactRefreshLogBox unterminated JSX 1`] = ` "./index.js Error: x Unexpected token. Did you mean \`{'}'}\` or \`}\`? - ,---- - 8 | } - : ^ + ,-[5:1] + 5 |

lol

+ 6 | div + 7 | ) + 8 | } + : ^ + 9 | \`---- x Unexpected eof - ,---- - 9 | - : ^ + ,-[6:1] + 6 | div + 7 | ) + 8 | } + 9 | \`---- Caused by: