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

Taught in

References