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
{{ message }}
This repository has been archived by the owner on May 8, 2024. It is now read-only.
const model = { some valid model };
const requestContext= { some valid requestContext};
const metadata = { some valid metadata };
const component = await ContentList({ model, requestContext, metadata });
const { container } = render(component);
throws:
Objects are not valid as a React child (found: [object Promise]). If you meant to render a collection of children, use an array instead.
165 |
166 | const component = await ContentList({ model, requestContext, metadata });
> 167 | const { container } = render(component);
| ^
168 |
169 | await waitFor(() => {
170 | expect(container).toMatchSnapshot();
at throwOnInvalidObjectType (node_modules/react-dom/cjs/react-dom.development.js:14887:9)
at reconcileChildFibers (node_modules/react-dom/cjs/react-dom.development.js:15828:7)
at reconcileChildren (node_modules/react-dom/cjs/react-dom.development.js:19167:28)
at mountIndeterminateComponent (node_modules/react-dom/cjs/react-dom.development.js:20157:5)
at beginWork (node_modules/react-dom/cjs/react-dom.development.js:21587:16)
at beginWork$1 (node_modules/react-dom/cjs/react-dom.development.js:27426:14)
at performUnitOfWork (node_modules/react-dom/cjs/react-dom.development.js:26560:12)
at workLoopSync (node_modules/react-dom/cjs/react-dom.development.js:26466:5)
at renderRootSync (node_modules/react-dom/cjs/react-dom.development.js:26434:7)
at recoverFromConcurrentError (node_modules/react-dom/cjs/react-dom.development.js:25850:20)
at performConcurrentWorkOnRoot (node_modules/react-dom/cjs/react-dom.development.js:25750:22)
at flushActQueue (node_modules/react/cjs/react.development.js:2667:24)
at act (node_modules/react/cjs/react.development.js:2582:11)
at node_modules/@testing-library/react/dist/act-compat.js:46:25
at renderRoot (node_modules/@testing-library/react/dist/pure.js:161:26)
at render (node_modules/@testing-library/react/dist/pure.js:247:10)
at Object.<anonymous> (tests/content-list.test.tsx:167:37)
throws:
Looks to be caused by unresolved promises in the component:
https://dev.to/clericcoder/how-i-fix-error-objects-are-not-valid-as-a-react-child-found-object-promise-3hp4
The text was updated successfully, but these errors were encountered: