Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShallowWrapper simulate does not return itself #1601

Closed
4 of 10 tasks
twisterghost opened this issue Mar 30, 2018 · 0 comments
Closed
4 of 10 tasks

ShallowWrapper simulate does not return itself #1601

twisterghost opened this issue Mar 30, 2018 · 0 comments

Comments

@twisterghost
Copy link

Current behavior

Using .simulate on a shallow wrapper does not seem to return itself (but returns undefined), which disallows something like:

component.simulate('click').simulate('mouseOut')

Where component is a shallow wrapper. When using mount instead of shallow, this works perfectly fine.

Expected behavior

ShallowWrapper.simulate should return itself per the documentation

Your environment

API

  • shallow
  • mount
  • render

Version

library version
Enzyme 3.3.0
React 15.4.2

Adapter

  • enzyme-adapter-react-16
  • enzyme-adapter-react-15
  • enzyme-adapter-react-15.4
  • enzyme-adapter-react-14
  • enzyme-adapter-react-13
  • enzyme-adapter-react-helper
  • others ( )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants