dillon1000/react
Commit
Browse files Separate createElement and JSX tests
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.
Changed paths7 files
First-parent comparisonsrc/browser/__tests__/ReactDOM-test.js ModifiedM src/classic/element/ReactElementValidator.js ModifiedM src/classic/element/__tests__/ReactElement-test.js ModifiedM src/classic/element/__tests__/ReactElementValidator-test.js ModifiedM src/core/ReactCompositeComponent.js ModifiedA src/modern/element/__tests__/ReactJSXElement-test.js AddedA src/modern/element/__tests__/ReactJSXElementValidator-test.js AddedPatch
Files changed
Rendering syntax-highlighted changes…