Mock Service Worker 🇺🇦

1.7K posts

Mock Service Worker 🇺🇦 banner
Mock Service Worker 🇺🇦

Mock Service Worker 🇺🇦

@ApiMocking

Industry standard API mocking for JavaScript.

Katılım Haziran 2020
8 Takip Edilen6.8K Takipçiler
Sabitlenmiş Tweet
Mock Service Worker 🇺🇦
Mock Service Worker 🇺🇦@ApiMocking·
The biggest change. The brightest change. Available for everyone to use. Migrate today and enjoy standard-driven API mocking!
Artem Zakharchenko@kettanaito

🎉 Announcing MSW 2.0! 🎉 🌎 Migration guidelines: mswjs.io/docs/migration… 📰 Release notes: github.com/mswjs/msw/rele… 365+ days in development, 200+ commits, 40+ contributors involved. The future of API mocking is here, and it has never been brighter.

English
3
13
88
30.6K
Mock Service Worker 🇺🇦 retweetledi
Artem Zakharchenko
Artem Zakharchenko@kettanaito·
Super excited to announce that @coderabbitai is joining MSW partners to help make the future of API mocking on the web more sustainable. Huge thank you! 🎉
Artem Zakharchenko tweet media
English
3
6
23
2.8K
Mock Service Worker 🇺🇦 retweetledi
Artem Zakharchenko
Artem Zakharchenko@kettanaito·
Would you pay a small one-time fee to download hand-crafted agent skills for MSW? Best practices, common mistakes, getting the most out of your mocks. This kind of stuff.
English
1
1
0
1.3K
Mock Service Worker 🇺🇦 retweetledi
Artem Zakharchenko
Artem Zakharchenko@kettanaito·
If you like MSW and would like to help make it more sustainable, please consider nominating it at endowment.dev/funding/ Share a short feedback about how it improved your development life. Costs you nothing. Might be a game-changer for its future. Thank you ❤️
English
2
6
17
4.5K
Mock Service Worker 🇺🇦 retweetledi
Artem Zakharchenko
Artem Zakharchenko@kettanaito·
Every time I talk to a team that doesn't use mswjs.io:
GIF
English
0
1
7
1.4K
Mock Service Worker 🇺🇦 retweetledi
React Prague
React Prague@react_prague·
Ever needed to handle API mocking? Our final speaker, @kettanaito, is the creator of @ApiMocking. He'll be joining us to talk about how the library became a standard for modern development. We're just 2 days away! Grab one of the last spots! See you there💛
React Prague tweet media
English
1
2
5
1.1K
Mock Service Worker 🇺🇦 retweetledi
Artem Zakharchenko
Artem Zakharchenko@kettanaito·
MSW has nearly doubled in downloads since last year. Huge.
Artem Zakharchenko tweet media
English
2
1
27
1.5K
Mock Service Worker 🇺🇦 retweetledi
Artem Zakharchenko
Artem Zakharchenko@kettanaito·
I genuinely want to understand developers that struggle with MSW. If you are one, please share your feedback! I've worked so hard to make it the best API mocking solution on the web. It's years ahead of the "competition", promotes web standards, has the richest feature set you can find. But there are still developers who struggle with it, apparently. I want to turn those struggles into features I can add and bugs I can fix. But I need to know them first! In Node.js, using MSW is no different than using any other solution you're familiar with. Some of them literally use MSW under the hood, providing a different flavor of UX. That part is subjective and I'm fine if some prefer other APIs to what MSW offers. As long as you're using the interception algorithm that doesn't diminish the value of your tests. In the browser, the only inconvenience I can think of is having to register a Service Worker. I get it, it's an extra step, not everybody is familiar with what that is and why that's needed. I used to wish to get rid of this step, but I find it both educational and secure. There is no better way to intercept the network in the browser than a Service Worker. And that means learning a bit about them and keeping your worker yours. Please share the things you struggled with in MSW, if any. I'd be grateful.
English
3
2
8
1.2K
Mock Service Worker 🇺🇦 retweetledi
Santosh Yadav
Santosh Yadav@SantoshYadavDev·
The last part of my sponsorship budget goes to @ApiMocking, happy to support work by @kettanaito always a big fan of his work.
Santosh Yadav tweet media
English
0
1
6
1.8K
Mock Service Worker 🇺🇦 retweetledi
Artem Zakharchenko
Artem Zakharchenko@kettanaito·
One sponsor cancellation away from being unsustainable btw 😔
Artem Zakharchenko tweet media
English
2
4
79
29.6K
Mock Service Worker 🇺🇦 retweetledi
Artem Zakharchenko
Artem Zakharchenko@kettanaito·
This year, I'd like to see what I can do to improve financial stability of MSW. Governments, banks, and Fortune 500 companies are all using my work while it's one sponsor cancellation away from me not being able to work on it at all. This has to change.
English
7
2
27
8.5K
Mock Service Worker 🇺🇦 retweetledi
Artem Zakharchenko
Artem Zakharchenko@kettanaito·
One of the biggest things I want to address in 2026 is how developers think about API mocking. We're used to import some library, call some functions, and requests are magically intercepted. I think we can do better.
English
3
1
8
1.5K
Mock Service Worker 🇺🇦 retweetledi
Artem Zakharchenko
Artem Zakharchenko@kettanaito·
Gigantic thank you to @ThePrimeagen, @trashh_dev, and @PlanetScale for this unexpected Christmas gift! ❤️ The words you said were way too kind, but I will do my best to live up to them. Merry Christmas!
Artem Zakharchenko tweet media
English
7
8
305
41K
Mock Service Worker 🇺🇦 retweetledi
Artem Zakharchenko
Artem Zakharchenko@kettanaito·
📣 Huge news: MSW ships a first-class support for Server-Sent Events! Develop, test, and debug your apps with the new `sse()` API. Learn more: mswjs.io/blog/server-se…
English
4
15
110
21.6K
Mock Service Worker 🇺🇦 retweetledi
Chris Cook
Chris Cook@zirkelc_·
I spent the last couple of days trying to mock the TRPC batch stream response in Playwright via its `route.fulfill()` API I've probably tried every possible combination of body (string, buffer, json,....) and headers (content-type, transfer-encoding, ...) Playwright doesn't accept a readable stream and I was hoping to work around it by returning a stringified JSONL response payload No luck. I was ready to give up and just mock higher up in the chain, like mocking the `httpBatchStreamLink` Then I remembered @ApiMocking, never used but read lots of positive things on X. I didn't want to waste any more time on a refactoring, so I was reluctant to even try it I stumble upon its Playwright binding `@msw/playwright`, the integration looked simple, so I decided to give it a try before giving up for good I added five more lines of code, ran Playwright, and it worked right away I'm still not sure whether to be happy that it finally works or sad that I wasted so much time on it 😀 Anyway, here's the relevant code in case anyone ever needs to figure this out again
Chris Cook tweet media
English
1
2
12
1.1K
Mock Service Worker 🇺🇦 retweetledi
Artem Zakharchenko
Artem Zakharchenko@kettanaito·
MSW now supports custom predicate functions for your handlers. Express more nuanced matching logic without exhausting your handler. Need to match against a query param? A header? A body chunk? Now you can! (including GraphQL)
Artem Zakharchenko tweet media
English
3
11
61
8.9K
Mock Service Worker 🇺🇦 retweetledi
Artem Zakharchenko
Artem Zakharchenko@kettanaito·
📣 Announcing "Advanced Vitest Patterns"! In this workshop, you'll become a @vitest_dev superuser by: - Crafting better testing experiences with custom, type-safe fixtures and assertions; - Making your tests more expressive and easier to debug with retryable and soft assertions; - Understanding how Vitest works under the hood and how you can change those default behaviors to get up to x40 performance boost in your tests; - Getting more out of Vitest with its vscode extension. And so much more! The newest addition to the Epic Testing bundle is out and 20% off for the next two weeks. Go get it!
Artem Zakharchenko tweet media
English
1
7
55
21.3K
Mock Service Worker 🇺🇦 retweetledi
Artem Zakharchenko
Artem Zakharchenko@kettanaito·
. @Google is using MSW (@ApiMocking) for testing the Gemini CLI! Retweet if you think they'd be a great GitHub Sponsor 👀
Artem Zakharchenko tweet media
English
3
14
45
3K
Mock Service Worker 🇺🇦 retweetledi
Cory House
Cory House@housecor·
My preferred React stack for 2025 Package manager: Bun Starter: Vite Language: TypeScript Router: Tanstack Router Remote state: Sync engine like Convex or Zero if possible, Tanstack Query otherwise. Form state: Tanstack Form Global/subtree state: Zustand Unit tests: Vitest Integration tests: Playwright Mocking: Mock Service Worker Runtime validation: Zod
English
70
50
1.1K
108.4K
Mock Service Worker 🇺🇦 retweetledi
Artem Zakharchenko
Artem Zakharchenko@kettanaito·
More people should check out this repo and this workshop: github.com/epicweb-dev/re… Test your React components in the actual browser with Vitest Browser Mode. This is the way.
English
0
12
62
8.2K
Mock Service Worker 🇺🇦 retweetledi
Artem Zakharchenko
Artem Zakharchenko@kettanaito·
I think authentication in E2E tests can be better. That's why I'm building a library called Playwright Persona. Learn what it is, why it exists, and how to use it: github.com/kettanaito/pla… And, please, share your thoughts! 🙏 Thank you.
English
6
11
128
10.6K