I wonder the API's just simple description, like the API assert.fail<http://nodemanual.org/0.8.14/nodejs_ref_guide/assert.html#assert.fail>,
when I follow the example code, I can not get the correct output as the
comment say:
-- Code --
var assert = require('assert');
var iX = 4;
var iY = 5;
assert.fail(iX, iY, "iX is bigger than iY", "<");
// prints nothing, because it does not fail
assert.fail(iX, iY, "iX is bigger than iY", ">");
// prints a failure, because iX > iY is not true
-- Code end --
The following is the API description:
So, Throws an exception that displays the values for actual and expected separated
> by the provided operator.
Who will explain the reason for me, thx!