All About Jest, Timers, and Mocks
How to use Jest fake timers, advance time safely in tests, and pair timer control with mocks and spies without flaky or misleading assertions.
How to use Jest fake timers, advance time safely in tests, and pair timer control with mocks and spies without flaky or misleading assertions.
This article explores the use of `Promise.withResolvers` in Node.js tests, providing examples and refactoring techniques to handle nested tests and signal their completion effectively. It also discusses the limitations of the `Promise.withResolvers` API in different Node.js versions.
How to harness the power of streams in Fastify web applications without resorting to raw HTTP replies via reply.raw and reply.hijack().
How do you find events to attend or speak at? I often get asked that and in this article I'll share the resources I use for CFP application and public speaking at conferences.
Getting started with MEAN.io JavaScript & Node.js framework by keeping up with the git branch of development