Follow up from https://github.com/facebook/react/pull/11616.

Here's one I found. These two invariants:

https://github.com/facebook/react/blob/7e7127387ba64f57299eaff8656542cea6fb3a2d/packages/react-reconciler/src/ReactFiberClassComponent.js#L330-L343

are in a function that's behind a DEV block:

https://github.com/facebook/react/blob/7e7127387ba64f57299eaff8656542cea6fb3a2d/packages/react-reconciler/src/ReactFiberClassComponent.js#L447-L449

I don't think this is intentional, but need to verify.

There may be more. I'll use this issue to track while https://github.com/facebook/react/pull/11616 preserves existing behavior.
if (console.error.calls && console.error.calls.reset) {
    console.error.calls.reset();
  } else {
    spyOnDev(console, 'error');
  }
  const result = await fn();
  if (
    console.error.calls &&
    console.error.calls.count() !== count &&
    console.error.calls.count() !== 0
  ) {
    console.log(
      `We expected ${
        count
      } warning(s), but saw ${console.error.calls.count()} warning(s).`,
    );
    if (console.error.calls.count() > 0) {
      console.log(`We saw these warnings:`);
      for (var i = 0; i < console.error.calls.count(); i++) {
        console.log(console.error.calls.argsFor(i)[0]);
      }
    }
  }
  if (__DEV__) {
    expect(console.error.calls.count()).toBe(count);
  }
  return result;
}
function renderIntoDom(reactElement, domElement, forceHydrate, errorCount = 0) {