How to test next function in beforeRouteEnter() #2509
Unanswered
steven-twerdochlib
asked this question in
Q&A
Replies: 1 comment
-
Hi @steven-twerdochlib |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have the following code:
How would I create a test that checks $store.commit was called with 'randomFunction'?
I've read you can test before RouteEnter with this
MyComponent.beforeRouteEnter.call(wrapper.vm, undefined, undefined, next)
but the issue with this is I have to define the next function in my test class which would mean it won't detect changes in the .vue class and correctly signal failures if the logic has changed.Beta Was this translation helpful? Give feedback.
All reactions