Hi Folks,
Two weeks have passed since the last Adventures in Nodeland edition. I have been swamped catching up with my backlog, and it is not getting shorter. I'm currently at 100+ notifications on GitHub to process: if you have been waiting for me for anything, let me know.
This newsletter explains one of the questions I got asked the most: "What test framework do you recommend," and I've been trying to answer. Then it includes a couple of video links as well as quite a lot of releases and articles.
There are two main features that I need when evaluating a unit test framework:
The ability to execute the test without a runner is critical: very often, you stumble on a problem, and you need to use --inspect
, pass some custom NODE_OPTIONS
, or even read the output unfiltered. This feature allows me to test lower-level issues within applications without switching unit test frameworks. The frameworks that support this are: node-tap
, vitest
, tape
, node:test
.
A unit test framework should not alter the globals of the runtime. If those are changed, debugging complex issues makes debugging harder because a bug could result from a bad interaction between your test framework and your codebase. Unfortunately, jest
changes the globals of the JavaScript runtime heavily, making it extremely hard to test specific error paths with it.
Lastly, I do not want to figure out how to set up code coverage for my toolchain, and I would like a framework that works out of the box.
Based on this criteria, my long-term preference is node-tap
, but node --test
is quickly becoming my go-to choice for small and large apps.
In the Live Stream of the 15th of June, I'm back fixing Platformatic Bugs: - Only add SQLite watch ignores in the config file #1099; - Add support for generating a client from a file #1100.
Last weekend Fastify.io was down - here is a quick explanation of what happened: https://youtu.be/ZjXA-qm772Y.
AsyncLocalStorage
instead of asynchronous-local-storage
.awilix-manager
and support for Node v20.@types/accepts
.saveRequestFile
is called twice.mercurius@13.0.0
and adds support for Node.j v20.instanceof
to detect undici instances - multiple versions could be used.JSONObject
type for transform
; it also adds support for the description
field on OpenAPI and swagger bodies.ajvFilePlugin
into the project.bearer
to Bearer
to match spec.