From a5f422d9601c1fe3766ca36c11e82ea2ffaebca2 Mon Sep 17 00:00:00 2001 From: Will Binns-Smith Date: Wed, 7 Feb 2024 11:33:23 -0800 Subject: [PATCH] Turbopack: update more snapshots MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These are correct since #61735 fixed tracing these. Unfortunately they don’t pass yet as the overlay is not properly dismissed when these errors are fixed. --- .../ReactRefreshLogBox-app-doc.test.ts | 124 +++++++++--------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/test/development/acceptance/ReactRefreshLogBox-app-doc.test.ts b/test/development/acceptance/ReactRefreshLogBox-app-doc.test.ts index 3804d0f61ae4d..e336f5755cab3 100644 --- a/test/development/acceptance/ReactRefreshLogBox-app-doc.test.ts +++ b/test/development/acceptance/ReactRefreshLogBox-app-doc.test.ts @@ -96,41 +96,41 @@ describe.each(['default', 'turbo'])( const source = next.normalizeTestDirContent(content) if (process.env.TURBOPACK) { expect(source).toMatchInlineSnapshot(` - "./pages/_app.js:2:11 - Parsing ecmascript source code failed - 1 | function MyApp({ Component, pageProps }) { - > 2 | return <; - | ^^^^^^^^^ - 3 | } - 4 | export default MyApp - - Expression expected" - `) + "./pages/_app.js:2:11 + Parsing ecmascript source code failed + 1 | function MyApp({ Component, pageProps }) { + > 2 | return <; + | ^ + 3 | } + 4 | export default MyApp + + Expression expected" + `) } else { expect(source).toMatchInlineSnapshot(` - "./pages/_app.js - Error: - x Expression expected - ,-[TEST_DIR/pages/_app.js:1:1] - 1 | function MyApp({ Component, pageProps }) { - 2 | return <; - : ^ - 3 | } - 4 | export default MyApp - \`---- - - x Expression expected - ,-[TEST_DIR/pages/_app.js:1:1] - 1 | function MyApp({ Component, pageProps }) { - 2 | return <; - : ^^^^^^^^^ - 3 | } - 4 | export default MyApp - \`---- - - Caused by: - Syntax Error" - `) + "./pages/_app.js + Error: + x Expression expected + ,-[TEST_DIR/pages/_app.js:1:1] + 1 | function MyApp({ Component, pageProps }) { + 2 | return <; + : ^ + 3 | } + 4 | export default MyApp + \`---- + + x Expression expected + ,-[TEST_DIR/pages/_app.js:1:1] + 1 | function MyApp({ Component, pageProps }) { + 2 | return <; + : ^^^^^^^^^ + 3 | } + 4 | export default MyApp + \`---- + + Caused by: + Syntax Error" + `) } await session.patch( @@ -146,7 +146,7 @@ describe.each(['default', 'turbo'])( await cleanup() }) - test('_document syntax error shows logbox', async () => { + test.only('_document syntax error shows logbox', async () => { const { session, cleanup } = await sandbox( next, new Map([ @@ -185,36 +185,36 @@ describe.each(['default', 'turbo'])( ) if (process.env.TURBOPACK) { expect(source).toMatchInlineSnapshot(` - "./pages/_document.js:3:35 - Parsing ecmascript source code failed - 1 | import Document, { Html, Head, Main, NextScript } from 'next/document' - 2 | - > 3 | class MyDocument extends Document {{ - | ^ - 4 | static async getInitialProps(ctx) { - 5 | const initialProps = await Document.getInitialProps(ctx) - 6 | return { ...initialProps } - - Unexpected token \`{\`. Expected identifier, string literal, numeric literal or [ for the computed key" - `) + "./pages/_document.js:3:36 + Parsing ecmascript source code failed + 1 | import Document, { Html, Head, Main, NextScript } from 'next/document' + 2 | + > 3 | class MyDocument extends Document {{ + | ^ + 4 | static async getInitialProps(ctx) { + 5 | const initialProps = await Document.getInitialProps(ctx) + 6 | return { ...initialProps } + + Unexpected token \`{\`. Expected identifier, string literal, numeric literal or [ for the computed key" + `) } else { expect(source).toMatchInlineSnapshot(` - "./pages/_document.js - Error: - x Unexpected token \`{\`. Expected identifier, string literal, numeric literal or [ for the computed key - ,-[TEST_DIR/pages/_document.js:1:1] - 1 | import Document, { Html, Head, Main, NextScript } from 'next/document' - 2 | - 3 | class MyDocument extends Document {{ - : ^ - 4 | static async getInitialProps(ctx) { - 5 | const initialProps = await Document.getInitialProps(ctx) - 6 | return { ...initialProps } - \`---- - - Caused by: - Syntax Error" - `) + "./pages/_document.js + Error: + x Unexpected token \`{\`. Expected identifier, string literal, numeric literal or [ for the computed key + ,-[TEST_DIR/pages/_document.js:1:1] + 1 | import Document, { Html, Head, Main, NextScript } from 'next/document' + 2 | + 3 | class MyDocument extends Document {{ + : ^ + 4 | static async getInitialProps(ctx) { + 5 | const initialProps = await Document.getInitialProps(ctx) + 6 | return { ...initialProps } + \`---- + + Caused by: + Syntax Error" + `) } await session.patch(