Skip to content

Commit

Permalink
Fix capitalization in formatted server errors (#44798)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanneslund authored Jan 12, 2023
1 parent 2b7e32c commit 0b36a52
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/next/src/lib/format-server-error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
12 changes: 6 additions & 6 deletions test/development/acceptance-app/server-components.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 0b36a52

Please sign in to comment.