Skip to content

Commit

Permalink
Coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoefe committed Nov 14, 2016
1 parent 7692ae2 commit 5bd4675
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/discrepances.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,8 @@ function compareArrays(a, b, opts) {
for(var i_ab=0; i_ab<max; ++i_ab){ compareArrayElem(res, a, b, i_ab, opts); }
if(a.length !== b.length) { rv.length = discrepances(a.length,b.length,opts); }
res.forEach(function(r,index) {
if(r) {
if(index in r) {
rv[index] = r[index];
} else {
rv[index] = r;
}
if(r && (index in r)) {
rv[index] = r[index];
}
});
if(rv.length) {
Expand Down Expand Up @@ -229,7 +225,9 @@ discrepances = function discrepances(a, b, opts){
var nameB = getName(typeB,b,classB);
if(classA !== classB) {
var r = {classes:[nameA,nameB]};
if(isSimpleValue(classA) && isSimpleValue(classB)) { r.values=[a,b]; }
if(isSimpleValue(classA) && isSimpleValue(classB)) {
r.values=[a,b];
}
return r;
} else if(!opts.duckTyping && a.constructor !== b.constructor) {
return {classes:[nameA,nameB]};
Expand Down

0 comments on commit 5bd4675

Please sign in to comment.