Mocking $refs in shallowMount #2537
Unanswered
steven-twerdochlib
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I was wondering if it's possible to mock $refs.randomComponentRef.randomFunction in vue 3?
I ask because I have the following method:
I want to test this in isolation of everything so preferably without using mount() and using shallowMount instead. This is because if I did mount the test would complain about undefined props/computed props which I just don't care about. I just want to check the function is called when randomMethod() is run.
Beta Was this translation helpful? Give feedback.
All reactions