react
react copied to clipboard
Fix ReactJSXElementValidator tests
Summary
Noticed in https://github.com/facebook/react/pull/29088 that some of these test assertions rely on the fact that Component
does not handle children
. This is likely a bug with the test since you wouldn't write components like this. Static type-checking would reject <Component>{children}</Component>
when Component
doesn't implement handling of children
.
How did you test this change?
-
yarn test --watch packages/react/src/__tests__/ReactJSXElementValidator-test.js