Node.js

Node.js: Test Runner Gets Smarter & Module Evolution Continues

A productive day in Node.js land with three key pull requests merged, including exciting new test context capabilities and continued evolution of the module system. Plus, we got a fresh release of Node.js 25.9.0 with some fantastic new features across async hooks, crypto, and more.

Duration: PT3M56S

https://podlog.io/listen/node-js-c43ec36a/episode/node-js-test-runner-gets-smarter-module-evolution-continues-f9047346

Transcript

Hey there, Node developers! Welcome back to another episode of the Node.js podcast. I'm so glad you're here with me today. Grab your favorite beverage because we've got some really exciting updates to dive into from April 2nd, 2026.

You know what I love about following Node.js development? It's like watching a masterpiece being painted one careful brushstroke at a time. And yesterday was no exception - we had three solid pull requests merged and some great additional commits that really show how thoughtfully this project evolves.

Let's start with the biggest story of the day, and honestly, this one has me pretty excited. Moshe Atlow just landed a fantastic enhancement to the test runner with the new `getTestContext()` public API. Now, I know what you might be thinking - "another API to learn?" - but hear me out on this one.

This is one of those features that solves a real problem developers have been facing. Moshe's use case was perfect - they wanted to expose a Pino logger that writes directly to test diagnostics. Before this, accessing test context from within async operations was... well, let's just say it wasn't as elegant as it could be. Now you can simply call `getTestContext()` and boom - you have access to all that juicy test context information.

What I really appreciate here is that this isn't just solving one narrow problem. This opens up so many possibilities for better debugging, logging, and test introspection. The API is clean, the documentation is thorough, and it shipped with solid test coverage. That's how you do it right.

Speaking of the test runner, Moshe was clearly on a roll because they also enhanced the SuiteContext with new properties - passed, attempt, and diagnostic. These might seem like small additions, but they're exactly the kind of quality-of-life improvements that make your daily testing workflow just a little bit smoother.

Now, let's talk about the module system evolution. Geoffrey Booth merged a pull request that runtime-deprecates `module.register()`. Before you panic - this is part of a thoughtful migration path. The team is moving toward `module.registerHooks()` which will eventually go stable, and this deprecation is laying the groundwork for that transition.

I love seeing this kind of forward-thinking API design. It's not about breaking things for the sake of change - it's about learning from experience and creating better developer experiences. The migration timeline is still being discussed, but having this deprecation in place gives everyone plenty of time to adapt.

We also got some important security housekeeping from Joyee Cheung, who expanded the memory leak DoS criteria to cover all types of denial-of-service scenarios in the security documentation. This might not seem exciting, but clear security guidelines make everyone's life easier - both for people reporting issues and for the maintainers triaging them.

And here's something that'll put a smile on your face - we got a fresh release! Node.js 25.9.0 dropped with some seriously cool features. The async hooks system now has scoping support in AsyncLocalStorage, there's a new `--max-heap-size` CLI option, and the crypto module gained support for TurboSHAKE and KangarooTwelve algorithms. Plus, the REPL got customizable error handling and ditched its dependency on the domain module. The single executable applications feature now supports code caching for ESM entry points too.

Today's Focus: If you're using `module.register()` in your projects, start planning your migration to `module.registerHooks()`. And if you're heavy into testing, definitely check out that new `getTestContext()` API - I have a feeling it's going to unlock some creative debugging workflows you hadn't considered before.

That's a wrap for today! The Node.js community continues to build amazing things, one commit at a time. Keep coding, keep learning, and I'll catch you tomorrow with more updates from the Node.js world. Until then, happy coding!