I am writing unit test for an existing vue component. The component has a method which runs on mount. The method uses return this.$parent.$parent.someData. I am looking for a way to pass grandparent mock data to the component while writing unit test. I know the way to pass parent component as mock, but looking for a way to pass grand parent.
I am using the following code in my test
const wrapper = shallowMount(MyComponent,{
parentComponent:ParentComponent
})
Looking for a way to pass grandparent component. I am using vue-test-utils.
PS: I cannot make changes in existing code