Feature: Add find* to gain alignment with react-test-renderer
k2snowman69 opened this issue · comments
It seems that react-test-renderer exports this package under react-test-renderer/shallow
to support shallow rendering. However this package doesn't contain the low level "find" functions that make it easy to dive into a shallow component similar to react-test-renderer
's default export.
The ask is to implement the following functions for consistency:
- testInstance.find()
- testInstance.findByType()
- testInstance.findByProps()
- testInstance.findAll()
- testInstance.findAllByType()
- testInstance.findAllByProps()
I know enzyme "provides a nicer higher-level API over the same functionality" my ask is to provide even basic low level to have alignment between shallow and deep core rendering engines.
I think we could probably just copy most of the logic for the deep renderer here and it should get us 80% of the way.
Then in the future Enzyme could update to use these lower level functions to help fuel it's higher level functions.