Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test fails if useNuxtApp used #744

Open
martinsjek opened this issue Jan 29, 2024 · 0 comments
Open

Test fails if useNuxtApp used #744

martinsjek opened this issue Jan 29, 2024 · 0 comments

Comments

@martinsjek
Copy link

martinsjek commented Jan 29, 2024

Environment

  • Operating System: Linux
  • Node Version: v18.19.0
  • Nuxt Version: 3.9.3
  • CLI Version: 3.10.0
  • Nitro Version: 2.8.1
  • Package Manager: [email protected]
  • Builder: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-vy6psx-sn3lfr

Describe the bug

[Vue warn]: Cannot mutate <script setup> binding "nuxtApp" from Options API. at <MountSuspendedComponent > at <MountSuspendedHelper> at <Anonymous ref="VTU_COMPONENT" > at <VTUROOT> [Vue warn]: Unhandled error during execution of render function at <MountSuspendedComponent > at <MountSuspendedHelper> at <Anonymous ref="VTU_COMPONENT" > at <VTUROOT>

I get this error message whenever I try to use useNudxtApp() in a component.
Before the merge of nuxt-vitest and @nuxt/text-utils, this worked fine.

Additional context

Tests can be ran with: npm run test ./pages/tests/index.spec.ts

Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant