Should we remove the t.ifError() assertion? It's functionally equivalent to t.falsy(). I suppose it's meant to be a "fail test if this variable contains an error" kind of assertion:
test.cb('look no error', t => {
obj.asyncWithCallback((err, result) => {
t.ifError(err); // Guard against there being an error
t.is(result.value, 'bob'); // Now access `result`
t.end(); // Aaaand done!
});
});
This is odd though. t.end() can be passed an error, and besides we don't stop running the test implementation when an assertion fails so it doesn't do anything useful.
@avajs/core?
Should we remove the
t.ifError()assertion? It's functionally equivalent tot.falsy(). I suppose it's meant to be a "fail test if this variable contains an error" kind of assertion:This is odd though.
t.end()can be passed an error, and besides we don't stop running the test implementation when an assertion fails so it doesn't do anything useful.@avajs/core?