Fast Mocked Responses in Playwright Getting You Down? Deferred Promises to the Rescue
This post was published on
How to use deferred promises to control mock response timing in Playwright tests and avoid race conditions with instant responses.
I'm Schalk Neethling, and I build for the web platform. That means starting with HTML, CSS, and JavaScript, leaning into what the platform gives us before reaching for frameworks. But I'm not dogmatic. When the platform doesn't solve the problem, I use the tool that does.
Above all, I write code that future developers (including future me) can trust. That means semantic markup, explicit types, validated data, and clear intent over clever shortcuts.
I have complicated feelings about AI. I'm concerned about how it's trained, deployed, and often wasted as entertainment. But I also use it daily in my engineering work because it's genuinely empowering. It helps me learn faster and dive deeper into the things I actually care about.
Here's my rule: if I'm using AI, I have to expect more from myself. I have to build software that's demonstrably better in accessibility, performance, and maintainability. Technology is only as good as what we choose to do with it.
Currently: Senior frontend engineer at Factorial.io • Writing HTML: A Comprehensive Guide
This post was published on
How to use deferred promises to control mock response timing in Playwright tests and avoid race conditions with instant responses.
This post was published on
AI coding agents have made me significantly more productive as an engineer, but they have a systematic problem: as context fills, they drift from explicit guidance and violate documented patterns. This examines AI limitations and the workflow adaptations that help while labs address the underlying issues.
This post was published on
Combining Zod's runtime validation with JSDoc's type annotations to achieve type safety in JavaScript without TypeScript.
There are many ways to support the sustainability of open-source and the people and communities that maintain it. One way is through financial sponsorship. Each month I will feature a different project I rely on and encourage you to support it or use this as inspiration to find and support the projects you rely on.
If you run a business, it makes business sense to sponsor the project to ensure it remains healthy and actively maintained for years to come. If you are an individual, you can of course still contribute financially, but you can also show your support by talking about the project, writing blog posts, making videos, and writing tutorials. If you are in a position to do so, consider suggesting to your employer to financially support the project.
The web framework for content-driven websites. Astro powers the world's fastest websites, client-side web apps, dynamic API endpoints, and everything in-between.
Learn how you can support Astro »