Unverified Commit cdba5ef0 authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

Missing React 18 error codes (#90593)

Co-authored-by: 's avatarCursor Agent <cursoragent@cursor.com>
parent a8de0a00
...@@ -118,6 +118,7 @@ describe('ReactRefreshLogBox', () => { ...@@ -118,6 +118,7 @@ describe('ReactRefreshLogBox', () => {
if (isTurbopack) { if (isTurbopack) {
await expect(browser).toDisplayRedbox(` await expect(browser).toDisplayRedbox(`
{ {
"code": "E394",
"description": "no", "description": "no",
"environmentLabel": null, "environmentLabel": null,
"label": "Runtime Error", "label": "Runtime Error",
...@@ -135,6 +136,7 @@ describe('ReactRefreshLogBox', () => { ...@@ -135,6 +136,7 @@ describe('ReactRefreshLogBox', () => {
} else { } else {
await expect(browser).toDisplayRedbox(` await expect(browser).toDisplayRedbox(`
{ {
"code": "E394",
"description": "no", "description": "no",
"environmentLabel": null, "environmentLabel": null,
"label": "Runtime Error", "label": "Runtime Error",
...@@ -1099,6 +1101,7 @@ describe('ReactRefreshLogBox', () => { ...@@ -1099,6 +1101,7 @@ describe('ReactRefreshLogBox', () => {
if (isReact18) { if (isReact18) {
await expect(browser).toDisplayRedbox(` await expect(browser).toDisplayRedbox(`
{ {
"code": "E394",
"description": "{"a":1,"b":"x"}", "description": "{"a":1,"b":"x"}",
"environmentLabel": null, "environmentLabel": null,
"label": "Runtime Error", "label": "Runtime Error",
...@@ -1148,6 +1151,7 @@ describe('ReactRefreshLogBox', () => { ...@@ -1148,6 +1151,7 @@ describe('ReactRefreshLogBox', () => {
if (isReact18) { if (isReact18) {
await expect(browser).toDisplayRedbox(` await expect(browser).toDisplayRedbox(`
{ {
"code": "E394",
"description": "class Hello { "description": "class Hello {
}", }",
"environmentLabel": null, "environmentLabel": null,
...@@ -1197,6 +1201,7 @@ describe('ReactRefreshLogBox', () => { ...@@ -1197,6 +1201,7 @@ describe('ReactRefreshLogBox', () => {
if (isReact18) { if (isReact18) {
await expect(browser).toDisplayRedbox(` await expect(browser).toDisplayRedbox(`
{ {
"code": "E394",
"description": "string error", "description": "string error",
"environmentLabel": null, "environmentLabel": null,
"label": "Runtime Error", "label": "Runtime Error",
...@@ -1244,6 +1249,7 @@ describe('ReactRefreshLogBox', () => { ...@@ -1244,6 +1249,7 @@ describe('ReactRefreshLogBox', () => {
if (isReact18) { if (isReact18) {
await expect(browser).toDisplayRedbox(` await expect(browser).toDisplayRedbox(`
{ {
"code": "E394",
"description": "A null error was thrown, see here for more info: https://nextjs.org/docs/messages/threw-undefined", "description": "A null error was thrown, see here for more info: https://nextjs.org/docs/messages/threw-undefined",
"environmentLabel": null, "environmentLabel": null,
"label": "Runtime Error", "label": "Runtime Error",
......
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