Be more clear about what is not matching

This commit is contained in:
Raul Ochoa 2016-06-30 18:31:58 +02:00
parent 51747879d6
commit 74964bc696

View File

@ -73,7 +73,12 @@ describe('Batch API callback templates', function () {
var expectedQuery = expected.query[index];
assert.ok(expectedQuery);
Object.keys(expectedQuery).forEach(function(expectedKey) {
assert.equal(actualQuery[expectedKey], expectedQuery[expectedKey]);
assert.equal(
actualQuery[expectedKey],
expectedQuery[expectedKey],
'Expected value for key "' + expectedKey + '" does not match: ' + actualQuery[expectedKey] + ' ==' +
expectedQuery[expectedKey] + 'at query index=' + index
);
});
var propsToCheckDate = ['started_at', 'ended_at'];
propsToCheckDate.forEach(function(propToCheckDate) {