Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turbopack: update more snapshots #61786

Merged
merged 2 commits into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 61 additions & 61 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this indented so far now? 🙈

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rerecorded with Jest and it did this 🙈

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 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