Skip to content

Glossary: Coding Interviews in JavaScript

assert

Also written: node:assert, assert.equal, assert.deepEqual, AssertionError

Node's built-in module for quick tests. `assert.equal(actual, expected)` does nothing if the values are strictly equal and throws an `AssertionError` if not; `assert.deepEqual` compares the contents of arrays, objects and Maps.

Where the book teaches it

Related terms

node:testTest