Closed cowboy closed 11 years ago
Right now when an assertion like this fails:
test.ok(undefined, 'this value should be truthy');
We see this:
>> my test >> Message: this value should be truthy >> Error: this value should be truthy
But we should really see this:
>> my test >> Message: this value should be truthy >> Error: undefined == true
I think the fix is to change this line inside betterErrors:
betterErrors
if (!e || !e.actual || !e.expected) { return assertion; }
To this:
if (!e || !('actual' in e) || !('expected' in e)) { return assertion; }
Right now when an assertion like this fails:
We see this:
But we should really see this:
I think the fix is to change this line inside
betterErrors
:To this: