Pinia action is not returning values #1755
-
Hi Team, I have created test cases to test my code. Below is my .vue file code. Assume getUserCart() has an API call to get a user cart list from DB.
Below is my test case code.
If I remove createTestingPinia from the plunging and tried to run the test it is working. But when we provide createTestingPinia to plugin it is not working When I debug the code store.getUserCart() returns undefined. Can someOne please help to correct if anything wrong in my code. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Actions are stubbed: https://pinia.vuejs.org/cookbook/testing.html#customizing-behavior-of-actions |
Beta Was this translation helpful? Give feedback.
Actions are stubbed: https://pinia.vuejs.org/cookbook/testing.html#customizing-behavior-of-actions