Node.js® is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.
Published By From Node.js News · 1 min read
ReleaseNode.js 20.15.0 (LTS)
It is now possible to count the number of assertions and subtests that are expected to run within a test. If the number of assertions and subtests that run does not match the expected count, the test will fail.
Contributed by Colin Ihrig in #52860
This release introduces the --inspect-wait flag, which allows debugger to wait for attachement. This flag is useful when you want to debug the code from the beginning. Unlike --inspect-brk , which breaks on the first line, this flag waits for debugger to be connected and then runs the code as soon as a session is established.
Contributed by Kohei Ueno in #52734
This release exposes the crc32() function from zlib to user-land.
This is an excerpt. The full article is published by Node.js News.
Answers to common questions regarding this article's topic, architecture, and practical applications.
This release exposes the crc32() function from zlib to user-land. It computes a 32-bit Cyclic Redundancy Check checksum of data. If
value is specified, it is used as the starting value of the checksum,
otherwise, 0 is used as the starting value. The CRC algorithm is designed to compute checksums and to detect error
in data transmission. It's not suitable for cryptographic authentication. const = ('node:zlib');
const { } = ('node:buffer');
let
General
It is now possible to count the number of assertions and subtests that are expected to run within a test. If the number of assertions and subtests that run does not match the expected count, the test will fail.
How It Works
This release introduces the --inspect-wait flag, which allows debugger to wait for attachement. This flag is useful when you want to debug the code from the beginning. Unlike --inspect-brk, which breaks on the first line, this flag waits for debugger to be connected and then runs the code as soon as a session is established. Contributed by Kohei Ueno in #52734
General
It is now possible to count the number of assertions and subtests that are expected to run within a test. If the number of assertions and subtests that run does not match the expected count, the test will fail. test('top level test', => {
.plan(2);
.assert.ok('some relevant assertion here');
.subtest('subtest', () => {});
});JavaScript
Contributed by Colin Ihrig in #52860
General
Windows 32-bit Installer: https://nodejs.org/dist/v20.15.0/node-v20.15.0-x86.msi
Windows 64-bit Installer: https://nodejs.org/dist/v20.15.0/node-v20.15.0-x64.msi
Windows ARM 64-bit Installer: https://nodejs.org/dist/v20.15.0/node-v20.15.0-arm64.msi
Windows 32-bit Binary: https://nodejs.org/dist/v20.15.0/win-x86/node.exe
Windows 64-bit Binary: https://nodejs.org/dist/v20.15.0/win-x64/node.exe
Windows ARM 64-bit Binary: https://nodejs.org/dist