LaunchPadLab / lp-utils

Our Utilities
MIT License
1 stars 0 forks source link

Think about testing HOCs #6

Closed dpikt closed 7 years ago

dpikt commented 7 years ago

How would we go about this? Enzyme gives us a mount function that we can use to test lifecycle hooks, but this might be too complicated to be worth it.

davemcorwin commented 7 years ago

It depends what you need to test. If you need the lifecycle events on the wrapped component, then mount fits the bill. You can take a look at the tests for onLoad to see this in action.

dpikt commented 7 years ago

@davemcorwin Nice, looks pretty straightforward.