Node.js 18 Adds Core Test Runner
Written by Ian Elliot   
Tuesday, 26 April 2022

Node.js 18 has been released with improvements including the enabling by default of global fetch, and a core test runner module.

Node.js is an open-source, cross-platform asynchronous event driven JavaScript runtime built on Chrome's JavaScript engine. It uses an event-driven, non-blocking I/O mode and executes JavaScript code outside web browsers.


This release has an experimental global fetch API that is available by default. The addition gives Node.js a standardized interface for fetching resources over HTTP. The promise-based client can be used to send simplified HTTP requests, and was inspired by node-fetch.

Another addition is a node:test module that can be used to create JavaScript tests that report results in TAP (Test Anything Protocol) format. Tests created via the test module consist of a single function that is processed either as a synchronous function that is considered failing if it throws an exception; as a function that returns a Promise that is considered failing if the Promise rejects; or as a function that receives a callback function. If the callback receives any truthy value as its first argument, the test is considered failing.

Node.js now exposes the experimental implementation of the Web Streams API on the global scope 

The other main change to this release is the update of the V8 JavaScript engine to 10.1, which is part of Chromium 101. This brings with it several new features, including support for the findLast() and findLastIndex() array methods, and improved performance of class fields and private class methods so that initializing them is now as fast as ordinary property stores.

Node.js 18 is downloadable now.


More Information

Node.js Foundation Homepage

Related Articles

Node.js 16 Adds Apple Silicon Support

Node.js 15 Improves Rejection Handling

Node.js 14 Adds New Diagnostic Tools

Getting Started with Node.js

Node.js Gets A Foundation - Is It Rock Solid?

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.


Chatbots Hallucinate - Word Of The Year

The propensity of AI-powered chatbots to provide misinformation is referred to as "hallucinating" and is something that has come to popular attention - to such an extent that the verb "hallucinate" ha [ ... ]

AI Ready - Certification From Amazon

Amazon aims to provide free AI skills training to 2 million people  by 2025 with its new ‘AI Ready’ commitment. Building on its existing scholarship program with Udacity, next year Amazon is  [ ... ]

More News




or email your comment to: