Jest Mock useStore with useShallow #2852
-
Hello Team, Since it’s recommended to use useShallow with V5, we’re encountering an issue with our unit test coverage. The code within useShallow isn’t being captured by Jest. Any assistance would be greatly appreciated.
Test
|
Beta Was this translation helpful? Give feedback.
Answered by
dbritto-dev
Nov 12, 2024
Replies: 1 comment 5 replies
-
@smo043 you shouldn't mock |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
smo043
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@smo043 you shouldn't mock
useShallow
. BTW, we updated the testing guide to export anything fromzustand
by default.