update tests
This commit is contained in:
parent
f71b9b5aff
commit
bfce448a96
|
@ -26,7 +26,10 @@
|
|||
|
||||
if (Array.isArray(val)) {
|
||||
// assumes that arrays do not contain non-primitive values (no nested objects or arrays)
|
||||
return assert.deepEqual(val, actual[key]);
|
||||
if (!val[0] || 'object' !== typeof val[0]) {
|
||||
return assert.deepEqual(val, actual[key]);
|
||||
}
|
||||
return deepLike(val, actual[key]);
|
||||
}
|
||||
|
||||
if (val !== actual[key]) {
|
||||
|
@ -65,6 +68,13 @@
|
|||
// TODO deepHas
|
||||
// compare two objects and make sure that the second has all of what the first has (but perhaps more)
|
||||
|
||||
deepLike(expected, result);
|
||||
try {
|
||||
deepLike(expected, result);
|
||||
} catch(e) {
|
||||
console.error('[FAIL]', name);
|
||||
console.error(e.stack);
|
||||
console.log('');
|
||||
}
|
||||
console.log('');
|
||||
});
|
||||
}());
|
||||
|
|
Loading…
Reference in New Issue