posva / vue-router-mock

🧪 Easily mock routing interactions in your Vue apps
MIT License
201 stars 7 forks source link

TypeError: Cannot read properties of undefined (reading 'push') #195

Closed Essam-Harrous closed 1 year ago

Essam-Harrous commented 1 year ago

Reproduction

I have used the library to mock the vue router behaviour in my test and followed the steps in readme file, in general everything starts working pretty well, I managed to check the wrapper.router object functions, but when I run the test I got this bug that says Cannot read properties of undefined (reading 'push') in this line of my code router.push('/dashboard').

Steps to reproduce the behavior

  1. run the test

Additional information

image

posva commented 1 year ago

You are probably missing some of the installation steps but I cannot check without a boiled down reproduction