You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a router.push in my store, its working completely fine and im able to navigate accordingly
However when i try running test to it using vitest, it shows router not found. from what i see it actually couldnt read the "instance" of my router from my store.
it('will navigate user to Route.dashboard upon logging in', async () => {
const authStore = useAuthStore()
const router = useRouter()
expect(router.push).not.toHaveBeenCalled()
await authStore.login({
username: emailUsername,
password,
})
expect(router.push).toHaveBeenCalledOnce() // !! HERE is not found. any idea what might be the issue
})
The text was updated successfully, but these errors were encountered:
Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making.
What will happen?
If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritise it based on its severity and how many people we think it might affect.
If needs reproduction labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it.
How can I create a reproduction?
We have a couple of templates for starting with a minimal reproduction:
I have a router.push in my store, its working completely fine and im able to navigate accordingly
However when i try running test to it using vitest, it shows router not found. from what i see it actually couldnt read the "instance" of my router from my store.
i have this at the top of my file
and then
The text was updated successfully, but these errors were encountered: