-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Reproduction
Steps to reproduce the bug
When using injection in a setup store, executing tests results in a warning:
[Vue warn]: inject() can only be used inside setup() or functional components.
It seems to me that this warning does not occur when using the store in the actual application. It only appears during unit tests.
Expected behavior
No warning on the console
Actual behavior
A warning appears on the console: [Vue warn]: inject() can only be used inside setup() or functional components.
Additional information
I'm using Vitest.
I i understand the docs[1] correctly, the above way should be correct.
Extra question: How can I provide a value during unit tests?
Metadata
Metadata
Assignees
Labels
No labels