NO

node:test Patterns

Built-in Node.js test runner conventions

Details

Language / Topic
nodejsNode.js
Category
Testing

Rules

balanced
- Use `node:test` as the built-in test runner with `describe`/`it` blocks and `node:assert/strict`.
- Use `--watch` flag with `node --test` for test-driven development.
- Use `node:test` built-in module with `describe()`, `it()`, and `assert` — or Vitest/Jest for larger projects needing watch mode and mocking.
- Use `node:test` mock API (`mock.fn()`, `mock.method()`) instead of Sinon or Jest mocks.
- Use `node:test`'s built-in coverage with `--experimental-test-coverage`.