simulate() support for custom events on shallow rendered children
Open
API: shallow
feature request
- Dominant language
- JavaScript
- Stars
- 19.8k
- Forks
- 2k
- PR merge metrics
- No merged PRs in 30d
Description
Any thoughts on having simulate run arbitrary custom events on a shallowly rendered child? Ie ideally I'd like to be able to call simulate on any of a shallow rendered childs props that call a function.
ex calling `simulate('customEvent')` on ` would run`func()` on a shallow rendered component.
This would allow us to assert functions that might not run on standard dom events without having to write a full integration test.
We could create a new function shallowSimulate() or something if we're worried about the interactions on fully `mount()`ed components.
Contributor guide
Assessment
This issue has not been assessed yet.