Unit Tests - Is there a way to mock only one store? #2672
-
Hi, I currently have a store that depends on another store (Store A uses store B). I would like to only mock the 'B' store but use the real implementation of store 'A' since it's the testing subject. When using Is there a way do this? Thank you! :) |
Beta Was this translation helpful? Give feedback.
Answered by
posva
Jul 1, 2024
Replies: 1 comment
-
I would use a native mock (jest, vitest have docs for this). But I would also consider not mocker the stores at all and just write an integration test to avoid mocking too much and not testing anything. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
posva
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would use a native mock (jest, vitest have docs for this). But I would also consider not mocker the stores at all and just write an integration test to avoid mocking too much and not testing anything.