Does anyone here have success/working
Does anyone here have success/working example how to mock convex hooks? I tried to follow the injection test example with
fakeConvexClient from convex-helpers repo. But no matter how i try to set it up I get the error TypeError: Cannot convert object to primitive value at Object.localQueryResult. This also happens if you run tests in the convex-helpers repo, so probably fakeConvexClient class is outdated...2 Replies
I quickly hacked something together for storybook, to be used with the
storybook-addon-module-mock addon:
It works for now but is not very flexible 🤷♂️Yeah looks like
fakeConvexClient in convex-helpers is out of date. Thanks for reporting and I'll look into updating that.
Here's an attempt at patching it: