dillon1000/react
Commit
Browse files [Fiber] Fix tests for Fiber in ReactElement-test (#8150)
* Test Fiber internals differently in ReactElement Instead of being able to access the owner's instance via getPublicInstance(), we use the Fiber's stateNode. (Fiber does not have methods, it's just a structure!) * Fix isCompositeComponentWithType for fiber In ReactTestUtils.isCompositeComponentWithType, we provide a way to walk through Fiber's internals in place of using _currentElement.type. We keep support for non-fiber though. * Test fiber reconciler consistently Use typeof instance.tag to test if we're using the fiber reconciler * Remove unnecessary comment
Changed paths2 files
First-parent comparisonsrc/isomorphic/classic/element/__tests__/ReactElement-test.js ModifiedM src/test/ReactTestUtils.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…