Mocking nested pinia stores with @pinia/testing #1177
-
Hello, currently I have Pinia store A that is importing Pinia store B to utilize some of its actions. However, when I use createTestingPinia for my unit test for a component that uses Pinia Store A, I keep receiving an error that Pinia Store B was called with no active pinia. I currently have mocked Pinia Store B with jest to get around for error, but is there any other way to set up testing with nested pinia stores? |
Beta Was this translation helpful? Give feedback.
Answered by
posva
Mar 31, 2022
Replies: 1 comment 10 replies
-
I added a test using nested stores and it works: de0b256 Do you have a failing test? |
Beta Was this translation helpful? Give feedback.
10 replies
Answer selected by
posva
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I added a test using nested stores and it works: de0b256
Do you have a failing test?