Why I code against a mock API: 1 I control the speed 2 It's never down 3 No...


Why I code against a mock API:
1 I control the speed
2 It's never down
3 No internet required
4 No cross-team dependency
5 I can force it to throw errors to simulate server errors
6 I can write fast, reliable app tests
7 When I find a bug, I can enhance mock data and test it
3 solid options for local mock APIs:

1. json-server: https://github.com/typicode/json-server

2. miragejs: https://miragejs.com/

3. msw: https://github.com/mswjs/msw

View original on X