In a few situations in our unit tests, we use .dispatchEvent on a jsdom DOM node in order to use the jsdom event system:

https://github.com/facebook/react/blob/e612826650ff68e73bff4d71db01fea8147ee1fd/src/renderers/dom/shared/wrappers/__tests__/ReactDOMInput-test.js#L127

But it appears that if the event handler throws (ex: change the onChange handler in that test to throw), then the error is silently ignored and does not cause the test to fail.

jsdom does make some attempt to report an error:

https://github.com/tmpvar/jsdom/blob/9.8.3/lib/jsdom/living/events/EventTarget-impl.js#L235

We should hook into this in our jest config (scripts/jest/test-framework-setup.js) and see if we can fail any test that triggers this exception behavior. From the implementation of reportException it looks like we might be able to do an onerror handler; if that doesn't work then hooking into their "virtual console" may be possible.
const originalMethod = console[consoleMethod];
      
      console[consoleMethod] = consoleSpy;
      try {
        callback();
      } catch (error) {
        caughtError = error;
      } finally {
        
        console[consoleMethod] = originalMethod;
        
        
        if (caughtError) {
          throw caughtError;
        }
        
        if (unexpectedWarnings.length > 0) {
          return {
            message: () => unexpectedWarnings[0].stack,
            pass: false,
          };
        }
        
        if (expectedMessages.length > 0) {
          return {
            message: () =>
              `Expected warning was not recorded:\n  ${this.utils.printReceived(