.toStrictEqual()

This assertion checks a subject is equal to a value including undefined properties.

jestUnexpected({
    a: undefined,
    b: 2
}).toStrictEqual({ b: 2 });
expected { aundefinedb2 } to strict equal { b2 }
  
expected aundefinedb2 } not to contain property 'a'
jestUnexpected({
    b: 2
}).toStrictEqual({ a: undefined, b: 2 });
expected { b2 } to strict equal { aundefinedb2 }
  
expected b2 } to contain property 'a'