You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it('should catch invalid element from a browser only component',async()=>{
14
9
constbrowser=awaitnext.browser('/browser')
15
10
16
-
awaitassertHasRedbox(browser)
17
-
constsource=awaitgetRedboxSource(browser)
11
+
awaitexpect(browser).toDisplayRedbox(`
12
+
{
13
+
"count": 1,
14
+
"description": "Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
"description": "Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
51
38
52
-
3 | // Intermediate component for testing owner stack
53
-
4 | function Inner() {
39
+
Check the render method of \`Inner\`.",
40
+
"environmentLabel": null,
41
+
"label": "Unhandled Runtime Error",
42
+
"source": "app/rsc/page.js (5:10) @ Inner
54
43
> 5 | return <Foo />
55
-
| ^
56
-
6 | }
57
-
7 |
58
-
8 | export default function Page() {"
44
+
| ^",
45
+
"stack": [
46
+
"Inner app/rsc/page.js (5:10)",
47
+
"Page app/rsc/page.js (11:7)",
48
+
],
49
+
}
59
50
`)
60
51
})
61
52
62
53
it('should catch invalid element from on ssr client component',async()=>{
"description": "Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
75
60
76
-
5 | // Intermediate component for testing owner stack
0 commit comments