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
Hi, I'm trying to test my mounted() function but don't know how to set this.$parent.$options.name to the value I want. This is my mounted() function for reference:
mounted() { if (this.$parent.$options.name !== 'randomComponent') { this.randomFunction(); } },
I've tried a few things but often get the error: TypeError: 'set' on proxy: trap returned falsish for property '$parent' Does anyone have an idea how to make a unit test for this in Vue 3, ideally using shallowMount?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to test my mounted() function but don't know how to set this.$parent.$options.name to the value I want.
This is my mounted() function for reference:
I've tried a few things but often get the error:
TypeError: 'set' on proxy: trap returned falsish for property '$parent'
Does anyone have an idea how to make a unit test for this in Vue 3, ideally using shallowMount?
Beta Was this translation helpful? Give feedback.
All reactions