Using mountSuspended()
with a component using <script setup>
and #import
makes an error
#871
Labels
mountSuspended()
with a component using <script setup>
and #import
makes an error
#871
Environment
Working directory: /home/projects/jvmibwmjx.github
Nuxt project info:
Reproduction
https://stackblitz.com/edit/github-mmtufx?file=app.vue
Describe the bug
Let's say there is a root component which I want to mount using
@nuxt/test-utils
'smountSuspended()
API. If this component<script setup>
#import
(i.e.useRouter
,useRoute
, ...)it makes an error below and breaks entire test.
Only if the root component meets the condition above, the issue occurs. As you see in the reproduction, if you use
#imports
and<script setup>
in child elements it work fine.The app itself is built and works fine if I run it.
You can reproduce the issue with the repository link above.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: