-
-
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
Documentation issue, mount -> update #2494
Comments
The document of
What does "something external" means? |
JavaScript outside of your test. |
@ljharb Sorry, still don't understand. There is an example in the doc .update() => Self. The example uses a class component with the property Is there any other scenario considered as "something external"? |
Hi! I'm just getting started with Enzyme, and I think it looks great so far.
I think I've come across a documentation issue. I work with TypeScript, and when I look at the method
update()
of the return value ofmount(...)
, like this:The documentation in my IDE says the following:
However, if I look at this page, it says:
If the latter is correct, this is definitely the function I'm looking for. I do have something external that is updating the state, so synchronizing the trees makes sense. If the former is correct, it's absolutely not something I want to do, because I feel like forcing a re-render breaks the integrity of the test. It should re-render on its own if everything is in order.
I hope you understand what I'm saying here, and I'd appreciate any answer that could indicate which of the documentation is correct (or if I'm looking at two different documentations completely!).
The text was updated successfully, but these errors were encountered: