Skip to content
This repository was archived by the owner on Oct 13, 2022. It is now read-only.

vue2 mocked router read/write example #90

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Craig1f
Copy link

@Craig1f Craig1f commented Feb 1, 2022

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant