3 ms·
Why not just mock the HOC to be the identity fn? `(Component) => Component`
by coderzach 10y ago
Why not just mock the HOC to be the identity fn? `(Component) => Component`
- eiriklv 10y agoThis is my preferred approach as well - and it (anecdotally) works great, since you can then just manually inject any props/spies as needed like any other "dumb" component. Edit: But he might be pointing to the testing of the actual HOCs/component decorating functions.