node:test

Node's test runner API, run with elide test.

node:test provides Node’s tests, suites, hooks, test context, and mocks; run test files with elide test.

elide test ./math.test.mjs

Differences from Node

  • elide run registers tests without running them and prints the elide test command to use.
  • run(), mock.module(), and the snapshot serializer setters throw ERR_METHOD_NOT_IMPLEMENTED.
  • Snapshot assertions are not available.