~/talk

Standard-driven API mocking

Talkat JSHeroes 2024 · 2024-05-23..05-24· [javascript, web-platform]
slides:none on file

MSW 2.0 moves API mocking onto web standards: it replaces custom handler APIs with the platform's Request/Response and leverages the service worker API for interception, unifying browser and Node (fetch, streams, headers). The rewrite throws away thousands of lines, fixes long compatibility workarounds, and keeps MSW as a reusable network layer. Adoption is concrete: more than 100,000 stars on GitHub and about 3 million weekly npm downloads, and the new API simply works with existing fetch semantics.

AI-written summary · about

  1. 0:00API mocking introduction
  2. 2:29Service Worker interception
  3. 5:59MSW and web standards
  4. 8:50Node.js 18 Fetch API
  5. 12:40Real-world impact
  6. 15:28Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.