I think this shouldn't pass:

```js
    expect(() => {
      expect(() => {
        throw new Error('haha') // no warning
      }).toWarnDev(
        'nope',
      );
    }).toThrow('haha');
```

but it does.
if (Object.is(objA, objB)) {
      return true;
    }
    if (
      typeof objA !== 'object' ||
      objA === null ||
      typeof objB !== 'object' ||
      objB === null
    ) {
      return false;
    }
    const keysA = Object.keys(objA);
    const keysB = Object.keys(objB);
    if (keysA.length !== keysB.length) {
      return false;
    }
    for (let i = 0; i < keysA.length; i++) {
      if (
        !hasOwnProperty.call(objB, keysA[i]) ||
        !Object.is(objA[keysA[i]], objB[keysA[i]])
      ) {
        return false;
      }
    }
    return true;
  }
  function shallowCompare(instance, nextProps, nextState) {