Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
I initially chose Mock Service Worker just as a Fetch mock replacement, for the only reason that it intercepts network requests at the network layer enabling mocking any requests including Axios's XMLHttpRequest ones.
msw-inspector is a tiny utility I wrote to inspect msw intercepted requests and let any testing framework asserting against them.
This post is a brief write-up about how Mock Service Worker radically improved testing experience and -surprisingly- overall development flow on a couple frontend projects I recently worked on.
I initially chose Mock Service Worker just as a Fetch mock replacement, for the only reason that it intercepts network requests at the network layer enabling mocking any requests including Axios's XMLHttpRequest ones.
Related posts
- Axios shipped a buggy version and it broke many productions apps. Let this be a lesson to pin your dependencies!
- API Mocking Strategies for JavaScript Applications
- API Handling: Utilizing the Facade Pattern with Axios in Frontend Development
- ManyShiba - The World's Greatest Twitter Bot
- The Developer's Guide to OWASP API Security