Assert Node.js v13.6.0 Documentation
CRANK

The assert module provides a set of assertion functions for verifying invariants. The module provides a recommended strict mode and a more lenient legacy mode.Class: assert.AssertionError[src]#Indicates the failure of an assertion. All errors thrown by the assert module will be instances of the AssertionError class.new assert.AssertionError(options)#options <Object>message <string> If provided, the error message is set to this value.actual <any> The actual property on the error instance.expected <any> The expected property on the error instance.operator <string> The operator property on the error instance.stackStartFn <Function> If provided, the generated stack trace omits frames before this function.A subclass of Error that indicates the failure of an assertion.All instances contain the built-in Error properties (message and name) and:actual <any> Set to the actual argument for methods such as assert.strictEqual().expected <any> Set to the expected value for methods such as assert.st…

nodejs.org
Related Topics: Node.js
2 comments