Glossary: Software Design Patterns in JavaScript
assert (node:assert/strict)
Also written: assert.equal, assert.deepEqual, assert.throws
Node's built-in checking functions for tests. assert.equal compares two values, assert.deepEqual compares arrays and objects by content, and assert.throws checks that a function fails with a matching message. A failed assert throws and fails the test.