mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
This essentially copies all classic element creation tests to the modern JSX tests. The classic tests doesn't use JSX and modern tests do. The idea is that the JSX tests can start dropping dynamic checks once we have Flow support for those features. JSX won't be necessary for dropping dynamic checks. Plain object will also work. Flow will also not be necessary for JSX. However, the tests should test for the suggested combination (JSX + Flow). This also moves some misplaced tests to ReactDOM and Validator. Note that the modern tests uses ES6 classes. I will add separate tests for those. However, these are not guaranteed to have .displayName so all our error messages should check .name if available instead. This should be better abstracted but I just adhoc fix this for now.