-
Notifications
You must be signed in to change notification settings - Fork 668
Prop not updated when immediate watcher accessing it (async mode) #1140
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
Comments
I'm getting this as well. This occurs also even if you aren't watching the prop directly, but are watching a computed prop that uses the prop. I made an example repo off of yours, install instructions are the same: https://github.com/DoubleB123/repro-vue-test-utils-sync/tree/computed |
I also occured this bug when watch for prop change after call |
I am having this same issue, has anyone found a successful workaround? |
I found the core reason for that :) When we have component with watcher for I've created #1300 to address this issue and added original failed test |
Nice find! |
@Dayna-A and everyone looking for a workaround,
I'm initializing the component in
(please note |
@bugy Thank you! This solved my problem with setProps()! |
Version
1.0.0-beta.29
Reproduction link
https://github.com/rndmerle/repro-vue-test-utils-sync/tree/setprops-watcher
Steps to reproduce
git clone -b setprops-watcher https://github.com/rndmerle/repro-vue-test-utils-sync.git
yarn && yarn test
What is expected?
Hello test passing, with logging on console:
What is actually happening?
Hello test not passing, with logging on console:
To make the test pass, either:
The text was updated successfully, but these errors were encountered: