You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wrapper.find('DisplayNameOfClassComponent').state() triggers Error: ReactWrapper::state() can only be called on class components when wrapper is a function component even though DisplayNameOfClassComponent is a class component and has state.
Expected behavior
Same behavior if wrapper is a class component or DisplayNameOfClassComponent itself i.e. all 3 test in the codesandbox pass.
Current behavior
wrapper.find('DisplayNameOfClassComponent').state()
triggersError: ReactWrapper::state() can only be called on class components
whenwrapper
is a function component even thoughDisplayNameOfClassComponent
is a class component and has state.Expected behavior
Same behavior if
wrapper
is a class component orDisplayNameOfClassComponent
itself i.e. all 3 test in the codesandbox pass.Your environment
API
Version
Adapter
The text was updated successfully, but these errors were encountered: