#fetch mock

1 messages · Page 1 of 1 (latest)

wise falcon
#

I have some components that use firebase httpsCallable cloud functions. I am looking for ways to mock them. storybook-addon-fetch-mock seemed like a good place to start but isn't yet compatible with 7. What are the recommendations for v7?

acoustic stump
#

Are you interested in finding a way to help make the addon compatible with 7.0? It may be as simple as a PR updating some dependencies. (I haven't looked)

wise falcon
#

i'm unsure. I haven't dug in to see if the firebase implementation uses fetch under the hood

#

but yah I guess that could be helpful none the les

#

but i'm also curious what the strategies are for using storybook for mocking services

wise falcon
#

What do you thin @acoustic stump

acoustic stump
#

Ah, thanks for the ping

#

Personally I use mirage.js to mock out my http calls, and I know that msw is also very popular, and it has a storybook addon.

#

I'm not too familiar with firebase though. Have you searched to see if there are any guides out there for mocking firebase calls in storybook already?