Skip to content

Commit

Permalink
qa-control
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoefe committed Nov 1, 2016
1 parent 6e28b81 commit 7c50349
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ rules:
# Best Practices
accessor-pairs: 2
block-scoped-var: 0
complexity: [2, 13]
complexity: [2, 14]
consistent-return: 0
curly: 0
default-case: 0
Expand Down
6 changes: 3 additions & 3 deletions lib/discrepances.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,19 +157,19 @@ function isSimpleValue(classType) {
}

discrepances = function discrepances(a, b, opts){
var opts = changing({unordered:true}, opts||{});
opts = changing({unordered:true}, opts||{});
if(a === b){ return null; }
var typeA = getType(a);
var typeB = getType(b);
if(typeA === typeB) {
if(typeA === 'number') { return {difference:a-b, values:[a,b]}; }
if(typeA === 'string') { return compareStrings(a, b); }
if(typeA==='object' && typeB==='object') {
var classA = getClassOnlyForSomeOfBuiltIns(a);
var classB = getClassOnlyForSomeOfBuiltIns(b);
if(a.constructor !== b.constructor) {
return {classes:[constructorName(a),constructorName(b)]};
}
var classA = getClassOnlyForSomeOfBuiltIns(a);
var classB = getClassOnlyForSomeOfBuiltIns(b);
if(classA !== classB) {
var r = {classes:[classA,classB]};
if(isSimpleValue(classA) && isSimpleValue(classB)) { r.values=[a,b]; }
Expand Down

0 comments on commit 7c50349

Please sign in to comment.