-
Notifications
You must be signed in to change notification settings - Fork 112
Vue provide/inject is not testable in components #539
Copy link
Copy link
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationpending triagevitest-environment
Description
Hi 👋
We're experiencing issues with Nuxt plugins that utilize vueApp.provide() to inject values. Consuming those injected values in components works fine when using the dev server. However when testing with nuxt-vitest these values are not set.
We've tried to pass the nuxtApp.vueApp as localVue in the mountSuspended() options but this seems to have no effect.
I've created a failing test case for this here (diff)
The new component for the test case should look like this:
But in tests the content (which is the injected value) is empty.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationpending triagevitest-environment
