Skip to content

1.1.0 - Add getWrappedComponent() function to wire decorated components

Choose a tag to compare

@billneff79 billneff79 released this 26 Mar 20:39
· 5 commits to master since this release

In order to help with unit testing (and likely other scenarios) the getWrappedComponent() method has been added to all decorator functions. This combines with the same function provided by other related libraries like preact-context-provider, preact-i18n, and preconf so that it is easier to get the underlying decorated component for the purpose of spying/stubbing on methods in unit tests without having to arbitrarily export an unwrapped version of the component from the module.