ok
Assert: ok(value, message)
Tests if value
is truthy. It is equivalent to assert.equal(!!value, true, message)
.
If value
is not truthy, an AssertionError
is thrown with a message property set equal to the value of the message
parameter. If the message
parameter is undefined, a default error message is assigned. If the message
parameter is an instance of an Error
then it will be thrown as the error.
Parameters
values
The first value is the value to test; the second, if any, is used as a string error message, thrown if the first value does not test as truthy.