Expand description
Node assert module. Failing assertions throw an AssertionError (returned
as an Err, which the host surfaces as a thrown JS exception).
Constants§
Functions§
- assert_
ok assert(value[, message])— throws unlessvalueis truthy.- call
- construct_
assertion_ error new assert.AssertionError(options)— a realError-prototype-linked object carryingname/message/code/actual/expected/operator. Parent wires this toconstruct("AssertionError")andconstant("assert","AssertionError").- deep_
equal - Structural equality.
strictcompares leaves with===, otherwise==. - strict_
call - The strict-mode variants (
assert.strict.equal===assert.strictEqual). Maps the loose method names onto their strict counterparts, then delegates.