diff --git a/packages/next/src/lib/format-server-error.ts b/packages/next/src/lib/format-server-error.ts index c89d7bcd3e70d..3b6765baf256e 100644 --- a/packages/next/src/lib/format-server-error.ts +++ b/packages/next/src/lib/format-server-error.ts @@ -30,7 +30,7 @@ export function formatServerError(error: Error): void { error, `${error.message} -This might be caused by a React Class component being rendered in a server component, React Class components only works in Client Components. Read more: https://nextjs.org/docs/messages/class-component-in-server-component` +This might be caused by a React Class Component being rendered in a Server Component, React Class Components only works in Client Components. Read more: https://nextjs.org/docs/messages/class-component-in-server-component` ) return } diff --git a/test/development/acceptance-app/server-components.test.ts b/test/development/acceptance-app/server-components.test.ts index b99b0ed134263..ef71837e65271 100644 --- a/test/development/acceptance-app/server-components.test.ts +++ b/test/development/acceptance-app/server-components.test.ts @@ -331,13 +331,13 @@ createNextDescribe( .waitForElementByCss('#nextjs__container_errors_desc') .text() ).toContain( - 'This might be caused by a React Class component being rendered in a server component' + 'This might be caused by a React Class Component being rendered in a Server Component' ) return 'success' }, 'success') expect(next.cliOutput).toContain( - 'This might be caused by a React Class component being rendered in a server component' + 'This might be caused by a React Class Component being rendered in a Server Component' ) await cleanup() @@ -384,13 +384,13 @@ createNextDescribe( .waitForElementByCss('#nextjs__container_errors_desc') .text() ).toContain( - 'This might be caused by a React Class component being rendered in a server component' + 'This might be caused by a React Class Component being rendered in a Server Component' ) return 'success' }, 'success') expect(next.cliOutput).toContain( - 'This might be caused by a React Class component being rendered in a server component' + 'This might be caused by a React Class Component being rendered in a Server Component' ) await cleanup() @@ -437,13 +437,13 @@ createNextDescribe( .waitForElementByCss('#nextjs__container_errors_desc') .text() ).toContain( - 'This might be caused by a React Class component being rendered in a server component' + 'This might be caused by a React Class Component being rendered in a Server Component' ) return 'success' }, 'success') expect(next.cliOutput).toContain( - 'This might be caused by a React Class component being rendered in a server component' + 'This might be caused by a React Class Component being rendered in a Server Component' ) await cleanup()