Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions test/development/acceptance-app/ReactRefreshLogBox.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1558,6 +1558,7 @@ describe('ReactRefreshLogBox app', () => {
if (isRspack) {
await expect({ browser, next }).toDisplayRedbox(`
{
"code": "E394",
"description": "module error",
"environmentLabel": null,
"label": "Runtime Error",
Expand All @@ -1577,6 +1578,7 @@ describe('ReactRefreshLogBox app', () => {
} else if (!isTurbopack) {
await expect({ browser, next }).toDisplayRedbox(`
{
"code": "E394",
"description": "module error",
"environmentLabel": null,
"label": "Runtime Error",
Expand Down
15 changes: 15 additions & 0 deletions test/development/acceptance-app/hydration-error.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ describe('Error overlay for hydration errors in App router', () => {
if (isTurbopack) {
await expect(browser).toDisplayCollapsedRedbox(`
{
"code": "E394",
"componentStack": "...
<Next.js Internal Component>
<Next.js Internal Component>
Expand Down Expand Up @@ -175,6 +176,7 @@ describe('Error overlay for hydration errors in App router', () => {
} else {
await expect(browser).toDisplayCollapsedRedbox(`
{
"code": "E394",
"componentStack": "...
<Next.js Internal Component>
<Next.js Internal Component>
Expand Down Expand Up @@ -336,6 +338,7 @@ describe('Error overlay for hydration errors in App router', () => {
await expect(browser).toDisplayCollapsedRedbox(`
[
{
"code": "E394",
"componentStack": "...
<Next.js Internal Component>
<Next.js Internal Component>
Expand Down Expand Up @@ -408,6 +411,7 @@ describe('Error overlay for hydration errors in App router', () => {

await expect(browser).toDisplayCollapsedRedbox(`
{
"code": "E394",
"componentStack": "...
<Next.js Internal Component>
<Next.js Internal Component>
Expand Down Expand Up @@ -503,6 +507,7 @@ describe('Error overlay for hydration errors in App router', () => {
await expect(browser).toDisplayCollapsedRedbox(`
[
{
"code": "E394",
"componentStack": "...
<Next.js Internal Component>
<Next.js Internal Component>
Expand Down Expand Up @@ -560,6 +565,7 @@ describe('Error overlay for hydration errors in App router', () => {
await expect(browser).toDisplayCollapsedRedbox(`
[
{
"code": "E394",
"componentStack": "...
<Next.js Internal Component>
<Next.js Internal Component>
Expand Down Expand Up @@ -618,6 +624,7 @@ describe('Error overlay for hydration errors in App router', () => {
await expect(browser).toDisplayCollapsedRedbox(`
[
{
"code": "E394",
"componentStack": "...
<Next.js Internal Component>
<Next.js Internal Component>
Expand Down Expand Up @@ -675,6 +682,7 @@ describe('Error overlay for hydration errors in App router', () => {
await expect(browser).toDisplayCollapsedRedbox(`
[
{
"code": "E394",
"componentStack": "...
<Next.js Internal Component>
<Next.js Internal Component>
Expand Down Expand Up @@ -711,6 +719,7 @@ describe('Error overlay for hydration errors in App router', () => {
],
},
{
"code": "E394",
"description": "<p> cannot contain a nested <p>.
See this log for the ancestor stack trace.",
"environmentLabel": null,
Expand Down Expand Up @@ -753,6 +762,7 @@ describe('Error overlay for hydration errors in App router', () => {
await expect(browser).toDisplayCollapsedRedbox(`
[
{
"code": "E394",
"description": "Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.",
"environmentLabel": null,
"label": "Console Error",
Expand All @@ -764,6 +774,7 @@ describe('Error overlay for hydration errors in App router', () => {
],
},
{
"code": "E394",
"componentStack": "...
<Next.js Internal Component>
<Next.js Internal Component>
Expand Down Expand Up @@ -799,6 +810,7 @@ describe('Error overlay for hydration errors in App router', () => {
],
},
{
"code": "E394",
"description": "<html> cannot contain a nested <script>.
See this log for the ancestor stack trace.",
"environmentLabel": null,
Expand All @@ -817,6 +829,7 @@ describe('Error overlay for hydration errors in App router', () => {
await expect(browser).toDisplayCollapsedRedbox(`
[
{
"code": "E394",
"description": "Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.",
"environmentLabel": null,
"label": "Console Error",
Expand All @@ -828,6 +841,7 @@ describe('Error overlay for hydration errors in App router', () => {
],
},
{
"code": "E394",
"componentStack": "...
<Next.js Internal Component>
<Next.js Internal Component>
Expand Down Expand Up @@ -861,6 +875,7 @@ describe('Error overlay for hydration errors in App router', () => {
],
},
{
"code": "E394",
"description": "<html> cannot contain a nested <script>.
See this log for the ancestor stack trace.",
"environmentLabel": null,
Expand Down
1 change: 1 addition & 0 deletions test/development/acceptance-app/rsc-runtime-errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ describe('Error overlay - RSC runtime errors', () => {

await expect(browser).toDisplayRedbox(`
{
"code": "E251",
"description": "\`cookies\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context",
"environmentLabel": null,
"label": "Runtime Error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ describe('ReactRefreshLogBox _app _document', () => {
const { browser, session } = sandbox
await expect(browser).toDisplayRedbox(`
{
"code": "E394",
"description": "The default export is not a React Component in page: "/_app"",
"environmentLabel": null,
"label": "Runtime Error",
Expand Down Expand Up @@ -48,6 +49,7 @@ describe('ReactRefreshLogBox _app _document', () => {

await expect(browser).toDisplayRedbox(`
{
"code": "E394",
"description": "The default export is not a React Component in page: "/_document"",
"environmentLabel": null,
"label": "Runtime Error",
Expand Down
10 changes: 10 additions & 0 deletions test/development/acceptance/ReactRefreshLogBox.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ describe('ReactRefreshLogBox', () => {
if (isTurbopack) {
await expect(browser).toDisplayRedbox(`
{
"code": "E394",
"description": "no",
"environmentLabel": null,
"label": "Runtime Error",
Expand All @@ -176,6 +177,7 @@ describe('ReactRefreshLogBox', () => {
} else if (isRspack) {
await expect(browser).toDisplayRedbox(`
{
"code": "E394",
"description": "no",
"environmentLabel": null,
"label": "Runtime Error",
Expand All @@ -202,6 +204,7 @@ describe('ReactRefreshLogBox', () => {
} else {
await expect(browser).toDisplayRedbox(`
{
"code": "E394",
"description": "no",
"environmentLabel": null,
"label": "Runtime Error",
Expand Down Expand Up @@ -1106,6 +1109,7 @@ describe('ReactRefreshLogBox', () => {
} else {
await expect(browser).toDisplayRedbox(`
{
"code": "E394",
"description": "{"a":1,"b":"x"}",
"environmentLabel": null,
"label": "Runtime Error",
Expand Down Expand Up @@ -1155,6 +1159,7 @@ describe('ReactRefreshLogBox', () => {
} else {
await expect(browser).toDisplayRedbox(`
{
"code": "E394",
"description": "class Hello {
}",
"environmentLabel": null,
Expand Down Expand Up @@ -1202,6 +1207,7 @@ describe('ReactRefreshLogBox', () => {
} else {
await expect(browser).toDisplayRedbox(`
{
"code": "E394",
"description": "string error",
"environmentLabel": null,
"label": "Runtime Error",
Expand Down Expand Up @@ -1248,6 +1254,7 @@ describe('ReactRefreshLogBox', () => {
} else {
await expect(browser).toDisplayRedbox(`
{
"code": "E394",
"description": "A null error was thrown, see here for more info: https://nextjs.org/docs/messages/threw-undefined",
"environmentLabel": null,
"label": "Runtime Error",
Expand Down Expand Up @@ -1403,6 +1410,7 @@ describe('ReactRefreshLogBox', () => {
if (isTurbopack) {
await expect(browser).toDisplayRedbox(`
{
"code": "E394",
"description": "anonymous error!",
"environmentLabel": null,
"label": "Runtime Error",
Expand All @@ -1419,6 +1427,7 @@ describe('ReactRefreshLogBox', () => {
} else {
await expect(browser).toDisplayRedbox(`
{
"code": "E394",
"description": "anonymous error!",
"environmentLabel": null,
"label": "Runtime Error",
Expand Down Expand Up @@ -1460,6 +1469,7 @@ describe('ReactRefreshLogBox', () => {

await expect(browser).toDisplayRedbox(`
{
"code": "E394",
"description": "Invalid URL",
"environmentLabel": null,
"label": "Runtime TypeError",
Expand Down
3 changes: 3 additions & 0 deletions test/development/acceptance/ReactRefreshRegression.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ describe('ReactRefreshRegression', () => {
if (isTurbopack) {
await expect(browser).toDisplayRedbox(`
{
"code": "E394",
"description": "boom",
"environmentLabel": null,
"label": "Runtime Error",
Expand All @@ -298,6 +299,7 @@ describe('ReactRefreshRegression', () => {
} else if (isRspack) {
await expect(browser).toDisplayRedbox(`
{
"code": "E394",
"description": "boom",
"environmentLabel": null,
"label": "Runtime Error",
Expand All @@ -312,6 +314,7 @@ describe('ReactRefreshRegression', () => {
} else {
await expect(browser).toDisplayRedbox(`
{
"code": "E394",
"description": "boom",
"environmentLabel": null,
"label": "Runtime Error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ describe('app-dir - capture-console-error-owner-stack', () => {

await expect(browser).toDisplayCollapsedRedbox(`
{
"code": "E394",
"description": "trigger an console <error>",
"environmentLabel": null,
"label": "Console Error",
Expand All @@ -32,6 +33,7 @@ describe('app-dir - capture-console-error-owner-stack', () => {

await expect(browser).toDisplayCollapsedRedbox(`
{
"code": "E394",
"description": "trigger an console.error in render",
"environmentLabel": null,
"label": "Console Error",
Expand All @@ -50,6 +52,7 @@ describe('app-dir - capture-console-error-owner-stack', () => {

await expect(browser).toDisplayCollapsedRedbox(`
{
"code": "E394",
"description": "trigger an console.error in render",
"environmentLabel": null,
"label": "Console Error",
Expand All @@ -68,6 +71,7 @@ describe('app-dir - capture-console-error-owner-stack', () => {

await expect(browser).toDisplayCollapsedRedbox(`
{
"code": "E394",
"description": "ssr console error:client",
"environmentLabel": null,
"label": "Console Error",
Expand Down
1 change: 1 addition & 0 deletions test/development/app-dir/dynamic-error-trace/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ describe('app dir - dynamic error trace', () => {
// TODO(veil): Where is the stackframe for app/page.js?
await expect(browser).toDisplayRedbox(`
{
"code": "E828",
"description": "Route / with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering",
"environmentLabel": "Server",
"label": "Runtime Error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ describe('app-dir - async-client-component', () => {
await expect(browser).toDisplayCollapsedRedbox(`
[
{
"code": "E394",
"description": "<Page> is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding \`'use client'\` to a module that was originally written for the server.",
"environmentLabel": null,
"label": "Console Error",
"source": null,
"stack": [],
},
{
"code": "E394",
"description": "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.",
"environmentLabel": null,
"label": "Console Error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ describe('hydration-error-count', () => {
await expect(browser).toDisplayCollapsedRedbox(`
[
{
"code": "E394",
"componentStack": "...
<Next.js Internal Component>
<Next.js Internal Component>
Expand Down Expand Up @@ -61,6 +62,7 @@ describe('hydration-error-count', () => {
await expect(browser).toDisplayCollapsedRedbox(`
[
{
"code": "E394",
"componentStack": "...
<Next.js Internal Component>
<Next.js Internal Component>
Expand Down Expand Up @@ -192,6 +194,7 @@ describe('hydration-error-count', () => {
await expect(browser).toDisplayCollapsedRedbox(`
[
{
"code": "E394",
"componentStack": "...
<Next.js Internal Component>
<Next.js Internal Component>
Expand Down Expand Up @@ -262,6 +265,7 @@ describe('hydration-error-count', () => {
await expect(browser).toDisplayCollapsedRedbox(`
[
{
"code": "E394",
"componentStack": "...
<Next.js Internal Component>
<Next.js Internal Component>
Expand Down Expand Up @@ -337,6 +341,7 @@ describe('hydration-error-count', () => {
await expect(browser).toDisplayRedbox(`
[
{
"code": "E394",
"componentStack": "...
<Next.js Internal Component>
<Next.js Internal Component>
Expand Down
Loading
Loading