@@ -23,7 +23,6 @@ function is42(input) {
23
23
function generateMatchAndDiffSpecialCase ( key , expectedObj , actualObj , metadata ) {
24
24
const expected = expectedObj [ key ] ;
25
25
const actual = actualObj [ key ] ;
26
- console . log ( 'MATCH AND DIFF' , key , expected , actual ) ;
27
26
28
27
if ( expected === null ) {
29
28
if ( key === 'readConcern' ) {
@@ -45,12 +44,13 @@ function generateMatchAndDiffSpecialCase(key, expectedObj, actualObj, metadata)
45
44
} ;
46
45
}
47
46
47
+ // An expected null value is not the same as the value not being present
48
+ // so an exact match is forced here.
48
49
const match = expected === actual ;
49
- // const match = !Object.prototype.hasOwnProperty.call(actualObj, key);
50
50
return {
51
51
match,
52
- expected : SYMBOL_DOES_NOT_EXIST ,
53
- actual : match ? SYMBOL_DOES_NOT_EXIST : actual
52
+ expected : expected ,
53
+ actual : actual === undefined ? SYMBOL_DOES_EXIST : actual
54
54
} ;
55
55
}
56
56
@@ -128,7 +128,6 @@ function generateMatchAndDiffSpecialCase(key, expectedObj, actualObj, metadata)
128
128
}
129
129
130
130
function generateMatchAndDiff ( expected , actual , metadata ) {
131
- console . log ( 'MATCH' , expected , actual ) ;
132
131
const typeOfExpected = typeof expected ;
133
132
134
133
if ( typeOfExpected === 'object' && expected . _bsontype === 'Int32' && typeof actual === 'number' ) {
0 commit comments