update docs to note future deprecation of .simulate#2182
update docs to note future deprecation of .simulate#2182browne0 wants to merge 2 commits intoenzymejs:masterfrom
Conversation
| @@ -1,5 +1,5 @@ | |||
| { | |||
| "gitbook": "3.2.2", | |||
| "gitbook": "3.2.3", | |||
There was a problem hiding this comment.
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