How to test Store state in tests? #1539
-
Hi 👋 I'm trying to get my basic component test working. I am following this guide: https://pinia.vuejs.org/cookbook/testing.html#unit-testing-a-store In their example code:
I get an error on this line when trying to use my own store:
Error:
If I then try to import my actual store with:
The error becomes:
Any tips or suggestions on what I might try to get a basic test working similar to the example code in the guide? Thank you for your time 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
hmmm...nevermind, I needed to import the store this way instead:
Though I am curious, what's the point of having this:
If I still have to import my actual store. Sorry, I must be missing something super trivial... |
Beta Was this translation helpful? Give feedback.
hmmm...nevermind, I needed to import the store this way instead:
Though I am curious, what's the point of having this:
If I still have to import my actual store.
Sorry, I must be missing something super trivial...