-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
update docs to note future deprecation of .simulate #2182
base: master
Are you sure you want to change the base?
Conversation
@@ -1,5 +1,5 @@ | |||
{ | |||
"gitbook": "3.2.2", | |||
"gitbook": "3.2.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was needed to get the docs working, looks like they updated the latest version.
@ljharb Could I get a review on this? Thanks. |
Don't know if it's too much to ask, but I was wondering whether you might include an example of the officially blessed way of testing components' behavior in response to DOM events. I am particularly curious about DOM-mounted components. It makes total sense to test shallow-rendered components by directly calling functions that they pass to their children as props, but for a fully mounted component, you might want to test it via its interactions with the DOM. |
Would it be considered out of scope/desirable to add a warning output to the console when |
@browne0 sorry for the long delay; i'll review this soon. @azangru that would require a full simulation interface, which I want too, but is way too massive a project to be developed as part of enzyme. It's not as simple as clicks; you'd want to simulate things like "type @ughitsaaron no, I'm not interested in spamming warnings on every usage of the method, i'd rather just remove it in v4; if we used react's caching approach to only show the message once, it'll be ignored by humans anyways. |
2227326
to
0d5ead7
Compare
43eb75e
to
39e6b1f
Compare
This PR updates the doc to explain that simulate doesn't work as intended. I included a link to the original issue that I opened on Friday. #2173