1 | import * as ReactDOMServerNode from 'react-dom/server'
1 | import * as ReactDOMServerNode from 'react-dom/server'
...
@@ -395,29 +395,29 @@ describe('react-dom/server in React Server environment', () => {
...
@@ -395,29 +395,29 @@ describe('react-dom/server in React Server environment', () => {
`)
`)
}else{
}else{
expect(redbox).toMatchInlineSnapshot(`
expect(redbox).toMatchInlineSnapshot(`
{
{
"description": "Failed to compile",
"description": "Error: x You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.",
Error: x You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.
Error: x You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.
3 | import ReactDOMServerNodeDefault from 'react-dom/server'
3 | import ReactDOMServerNodeDefault from 'react-dom/server'
\`----
\`----
x You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.
x You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.
expect(errorDescription).toBe('Failed to compile')
if(isTurbopack){
expect(errorDescription).toMatchInlineSnapshot(
`"Ecmascript file had an error"`
)
}else{
expect(errorDescription).toMatchInlineSnapshot(
`"Error: x Unknown cache kind "custom". Please configure a cache handler for this kind in the "experimental.cacheHandlers" object in your Next.js config."`