Skip to content

Commit

Permalink
Turbopack: update more snapshots
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wbinnssmith committed Feb 7, 2024
1 parent 13af19a commit a5f422d
Showing 1 changed file with 62 additions and 62 deletions.
124 changes: 62 additions & 62 deletions test/development/acceptance/ReactRefreshLogBox-app-doc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<Component {...pageProps} />;
| ^^^^^^^^^
3 | }
4 | export default MyApp
Expression expected"
`)
"./pages/_app.js:2:11
Parsing ecmascript source code failed
1 | function MyApp({ Component, pageProps }) {
> 2 | return <<Component {...pageProps} />;
| ^
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 <<Component {...pageProps} />;
: ^
3 | }
4 | export default MyApp
\`----
x Expression expected
,-[TEST_DIR/pages/_app.js:1:1]
1 | function MyApp({ Component, pageProps }) {
2 | return <<Component {...pageProps} />;
: ^^^^^^^^^
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 <<Component {...pageProps} />;
: ^
3 | }
4 | export default MyApp
\`----
x Expression expected
,-[TEST_DIR/pages/_app.js:1:1]
1 | function MyApp({ Component, pageProps }) {
2 | return <<Component {...pageProps} />;
: ^^^^^^^^^
3 | }
4 | export default MyApp
\`----
Caused by:
Syntax Error"
`)
}

await session.patch(
Expand All @@ -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([
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit a5f422d

Please sign in to comment.