-
Notifications
You must be signed in to change notification settings - Fork 667
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
A lot of [Vue-warn] warnings about props mutation are thrown when using vuetify with test-utils #534
Comments
I am having a smiliar issue |
@bizzzd According to your package.json in your repository, you are not using |
So the issues is somewhere here: v1.0.0-beta.12...v1.0.0-beta.13 (edited, thanks @tbsvttr) |
@timoschwarzer For me it happened after upgrading from Beta 12 to 13. |
@tbsvttr Yes, you are right. I thought I skipped beta.12 because of this issue but I skipped it because of another issue... |
i just tried to use 11 and it is still throwing them for me |
@akrome11 can you show me your package.json? |
I can confirm it also happens in Beta 15
|
I'm having the same issue unit testing around Vuetify components on 1.0.0-beta.15. Specifically using console.error node_modules/vue/dist/vue.runtime.common.js:589
[Vue warn]: $listeners is readonly.
found in
---> <VTextField>
<VForm>
<VCard>
<Root> There's a note on vue-test-utils that says:
That being said, according to the docs, $listeners is a global read only property on the Vue instance, not a property that Vuetify is introducing. |
Thanks for making this issue, the cause of this issue is the same as —#532 so I'm closing this in favor of #532. The problem is that we set all watchers to sync, including the update watcher. This causes a re-render when the comonent updates the attrs. Then before the listeners have been updated, I'm going to look into this further, but updates will be added to the other issue. |
Version
1.0.0-beta.10
Reproduction link
https://bitbucket.org/alexeybogachev/vue-mutate-warn-issue/src/d606fb8b8a815a33366dce917eb5f2116ea7b7e7?at=master
Steps to reproduce
Clone the repository:
https://bitbucket.org/alexeybogachev/vue-mutate-warn-issue/src/d606fb8b8a815a33366dce917eb5f2116ea7b7e7?at=master
run in cmd:
npm install
npm run test
What is expected?
No [vue-warn] messages are thrown
What is actually happening?
It throws warnings
console.error node_modules\vue\dist\vue.runtime.common.js:589
[Vue warn]: $listeners is readonly.
console.error node_modules\vue\dist\vue.runtime.common.js:589
[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "placeholder"
Without using test-util (with using $mount) it works as expected:
I created a separate branch that demonstrates this: https://bitbucket.org/alexeybogachev/vue-mutate-warn-issue/branch/no-test-utils
The text was updated successfully, but these errors were encountered: