Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
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
Nuxt
Join
Nuxt Community Chat Server
31,817
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
UseRoute within middleware (nuxt content)
N
Nuxt / ❓・help
2y ago
Nuxt useRoute is not reactive
N
Nuxt / ❓・help
2y ago