
Ask HN: What do you use for mocking APIs? - shubhamjain
Since the split between backend and frontend teams is becoming the norm, a persistent problem that frontend devs have to face is to work with the API that doesn&#x27;t yet exist. What do you use for solving this problem?
======
2color
A couple of strategies can help with this

\- If you use fetch: this one's nice [https://github.com/wheresrhys/fetch-
mock](https://github.com/wheresrhys/fetch-mock)

\- Define the API with [https://swagger.io/](https://swagger.io/)

\- Contract testing (that's great if you have many consumers that rely on the
API)

