node:test

node:test is the test runner built into Node.js, usable with no external dependency via node --test. It provides test, describe, and it, hooks, and the node:assert module for assertions.

Example

import test from 'node:test';
import assert from 'node:assert';
test('addition', () => assert.strictEqual(2 + 3, 5));

Related concepts

The whole glossary