cypress-component-testing-examples
cypress-component-testing-examples copied to clipboard
vue2 mocked router read/write example
To test a component that uses query params for state. We need to read from a mocked $route, and we need to push to a mocked $router.
Sets up $router with a spy so we can test attempts to update the $router. Adapted to use cy.spy() instead of jest.