Skip to content

Releases: synacor/preconf

Add getWrappedComponent() function to interface of wrapped Component

Choose a tag to compare

@billneff79 billneff79 released this 26 Mar 20:37

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 wiretie, preact-i18n, and preact-context-provider 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.