I want to test Vue Router's "beforeRouteUpdate" and "beforeRouteLeave" navigation guards in my Vue 2 project.
Although many answers exist about how to test them with Vue Test Utils, I could not find how to do that with Vue Testing Library. In those answers (for Vue Test Utils), they suggest getting the function by
wrapper.vm.$options.beforeRouteUpdate[0]
Unfortunately, it seems the wrapper is not exposed in Vue Testing Library, so I got stuck.
So... what is the right way to test Vue Router's navigation guards using Vue Testing Library? Or should I use Vue Test Utils for that purpose?
