Commit 0ef0cdef authored by Niklas Mischkulnig's avatar Niklas Mischkulnig

update snapshots

parent 965286b3
...@@ -194,7 +194,7 @@ describe('Error overlay - RSC build errors', () => { ...@@ -194,7 +194,7 @@ describe('Error overlay - RSC build errors', () => {
`) `)
} else { } else {
expect(await session.getRedboxSource()).toInclude( expect(await session.getRedboxSource()).toInclude(
`You're importing a component that imports client-only. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.` `'client-only' cannot be imported from a Server Component module`
) )
} }
}) })
......
...@@ -114,22 +114,9 @@ describe('module layer', () => { ...@@ -114,22 +114,9 @@ describe('module layer', () => {
async () => { async () => {
await waitForRedbox(browser) await waitForRedbox(browser)
const source = await getRedboxSource(browser) const source = await getRedboxSource(browser)
expect(source).toMatchInlineSnapshot(` expect(source).toContain(
"./lib/mixed-lib/client.js "'client-only' cannot be imported from a Server Component module"
Error: x 'client-only' cannot be imported from a Server Component module. )
| It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.
| Learn more: https://nextjs.org/docs/app/building-your-application/rendering
,-[1:1]
1 | import 'client-only'
: ^^^^^^^^^^^^^^^^^^^^
2 |
3 | export const client = 'client:module'
\`----
Import trace for requested module:
./lib/mixed-lib/client.js
./lib/mixed-lib/index.js"
`)
} }
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment