describe() and it()
Test functions that group tests into suites (describe) and define individual test cases (it).
In more detail
The names come from behaviour-driven testing, so a test reads like a sentence: describe("cart"), it("adds an item"). Nesting describe blocks groups related cases, and the reporter prints them as an indented outline.
Related terms
- test suite — A collection of tests run together to check a piece of software.
- test runner — A tool that finds test files, runs the tests in them and reports which passed and which failed.
Taught in
- Native Test Runner: node:test & node:assert/strict — Node.js Internals & Backend Services