But I hate context switching, Dominik. What do I do?
@kettanaito.com
Software engineer. Helping you master automated testing at http://EpicWeb.dev. Author mswjs.io. Instructor egghead.io. I tell stories @zakarcher.com. My debut book "LOGGERHEADS" it out π https://zakarcher.com/books/loggerheads
But I hate context switching, Dominik. What do I do?
Indeed! Wrapping up with the remaining tests and rolling it out.
Man, the upcoming network source architecture in MSW is so good. Everything has its own place. Everything is extensible. Your network, your rules (sounds like a freaking footwear slogan but whatever).
Crafting an Amber Medallion from Elden Ring
Crafting an Amber Medallion from Elden Ring
youtu.be/amBTq4QMo7c?...
I am definitely holding you to your invitation to Zurich! I would love to visit. Fingers crossed for 2028.
Same here! Man, you did such a fantastic talk. When I grow up, I want to present like you.
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 β€οΈ
This is such a gem!
A speaker presents to an audience, showcasing a slide with the text questioning the presence of automated testers. The atmosphere is engaging.
Had a great time talking about the history of MSW at React Prague. Thank you for having me!
Thank you! Done.
Download count, then dependents count are good places to start.
Is there any way to apply to this fund, by any chance? One of my projects, Mock Service Worker, is pretty much a critical project maintained by a single person.
About the entirety of the Expedition 33's OST.
Some level of customization will always be unattainable with PWAs by their design. And that might involve keeping some shortcuts non-configurable for security purposes. That stinks.
I'm actually considering limiting my PWA installs only to Chromium. It's a bit janky, I know, but should be possible with User-Agent detection and a nice user-focused UI of why that's needed.
Honestly, if Safari had great PWA support, the desktop apps would be completely solved by PWA + system WebView-based solutions like Tauri or Electrobun. But since Chromium is the most powerful browser out there, you likely want to ship it for your app.
- PWAs don't support in-place writes for files. This is honestly the most painful issue I have. If you have a 5MB project, you need to write the entire 5MB ever time you save. There's an open issue on GitHub, but I believe it's years old.
- More higher-level APIs. E.g. give me a fully-fledged API for working with local files: creating new, opening, saving, streaming, recovering, etc. EVERY PWA that has to work with files needs this and there's no reason for every app to reinvent the wheel.
The biggest things I miss are:
- Proper custom shortcuts. There's no way to override, say, Cmd+N and that's a shame (especially since you *can* override Cmd+O π€·).
- System-level menus. It's silly PWA officially recommend building custom menus *in* the app. That's a terrible UX.
I was happy to track down and report a severe bug in the LaunchParams API that rendered it fully unusable. That should be fixed in the next versions of Chrome.
The browser compatibility is another thing. Safari is terrible for PWAs, which is a shame since it's the default browser for many.
Indeed. I've been building an EPUB editor as a PWA and it's been fantastic so far. A few minor hurdles here and there, but nothing major. The web APIs are insanely powerful. You can process audio, video, images, textβanything now.
I just wish PWA APIs were more polished.
Luckily, Vitest brings in-browser testing at a convenience of an integration test.
And I would gladly throw these tools into a deep pit where they belong if I didn't a bunch of developers still using them and expecting MSW to work in environments that don't work themselves. When are we going to be past this hackery?
I hate browser-like environments. I don't think you realize how much. JSDOM doesn't implement streams (Blob.prototype.stream is undefined and breaks all consumers). HappyDOM messes up XHR events and returns undefined for "request.readyState", which must never happen.
π€¦ββοΈ
Start from mswjs.io/docs/quick-s.... Then dive into the GraphQL section: mswjs.io/docs/graphql/. After, read through the Best practices: mswjs.io/docs/best-pr...
This should get you on good feet.
Every time I talk to a team that doesn't use mswjs.io:
You know you are doing something stupid if you
- really need to stringify that function
- really need to access that # private field
- really, really need to patch that global
π€
It would be absolute bonkers if MSW reaches 20k stars on GitHub this year (github.com/mswjs/msw). Do you think we can do it?
So, anyhow, a bunch of exciting stuff happening in MSW. If you or your company want to support the future of API mocking on the web, please consider becoming a sponsor on GitHub: github.com/sponsors/mswjs
Thank you!
I plan on solving that by adding a new project to Vitest and using export conditions for those interceptors to give me the correct entrypoint when imported in Node.js. That should work.