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
Aaron-Pool
changed the title
Rer-ender does not occur synchronously when reactive data is changed in mounted life-cycle hook
Re-render does not occur synchronously when reactive data is changed in mounted life-cycle hook
Nov 27, 2018
recognizing this doesn't directly address the synchronicity issue, I found a slightly more elegant temporary workaround is to make the test async, then run as:
Version
1.0.0-beta.25
Reproduction link
https://github.com/Aaron-Pool/vue-test-utils-jest-example
Steps to reproduce
Run yarn
yarn jest
What is expected?
Test should pass, because reactive data changed in the mount component, so the scoped slot function should have been called again on re-render.
What is actually happening?
No re-render occurs, even though the data updates as expected.
I assume this has something to do with async vs. sync paradigm that is happening in the test-utils.
It works correctly if I run the test like so:
The text was updated successfully, but these errors were encountered: