© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
How to mock useRoute in nuxt ? - Nuxt
N
Nuxt
•
2y ago
•
3 replies
Tumulte
How to mock useRoute in nuxt ?
I would just like to access
route.params.id
route.params.id
in vitest BUT
, I cannot mock
useRoute
useRoute
the way we used to in Nuxt
.
No matter what
, route
.params
.id is undefined
I
've tried seting up a route in
mountSuspended
mountSuspended
but to no success
.
What
's the proper way
?
Thanks
Recent Announcements
Similar Threads
UseRoute within middleware (nuxt content)
N
Nuxt / ❓・help
2y ago
Nuxt useRoute is not reactive
N
Nuxt / ❓・help
2y ago