Skip to content

Test a Mock Router with composition API adn Vitest #1728

Answered by freakzlike
joseluisgs asked this question in Q&A
Discussion options

You must be logged in to vote

You overwrite your method with wrapper.vm.goToDaybook = vi.fn(). So it will no longer do it's normal logic (calling router.push). Remove the check of wrapper.vm.goToDaybook and try again

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@joseluisgs
Comment options

@freakzlike
Comment options

@joseluisgs
Comment options

@freakzlike
Comment options

@joseluisgs
Comment options

Answer selected by joseluisgs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants