Ein Blog

Node.js bekommt built-in Test-Runner. Aus dem Post:

const test = require('node:test');
const assert = require('assert');

test('synchronous passing test', (t) => {
  // This test passes because it does not throw an exception.
  assert.strictEqual(1, 1);


Wann kommt es?

Colin, the architect behind this initiative, has indicated that it will be available behind an experimental flag when Node 18 is pushed out, which is currently scheduled for April 19th.

It’s also available in nightly builds released after the 24th of March, 2022.