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
I have set up everything as described in the docs with a setupFilesAfterEnv file, and all standard router functions are nicely mocked. However, i'm having some trouble when using the vue router composition API methods such as useLink().
For example, the onBeforeRouteUpdate() function inside a setup script i causes the error:
[Vue Router warn]: No active route record was found when calling onBeforeRouteUpdate(). Make sure you call this function inside of a component child of . Maybe you called it inside of App.vue?
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
-
Hello and thank you for this great library 👍
I have set up everything as described in the docs with a
setupFilesAfterEnv
file, and all standard router functions are nicely mocked. However, i'm having some trouble when using the vue router composition API methods such as useLink().For example, the
onBeforeRouteUpdate()
function inside a setup script i causes the error:Also doing things like this:
causes the error
Is there any way to handle these composition API things together with this library?
Beta Was this translation helpful? Give feedback.
All reactions