I'm not sure if it was ever intended to be a part of public API.

It's not documented, and its naming is misleading because it actually doesn't simulate a native event (oops!). It only simulates what React would do if it *received* that native event. It does that in a way that's very tightly coupled to the event system internals which is unfortunate. It is much better if we can educate people how to dispatch actual browser events in tests instead.

I think we should just deprecate it. We've removed most tests relying on it, and can leave a test or two until it can be deleted in the next major.
forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
}
const Simulate = {};
const SimulateNative = {};
/**
 * Exports:
 *
 * - `Simulate.click(Element)`
 * - `Simulate.mouseMove(Element)`
 * - `Simulate.change(Element)`
 * - ... (All keys from event plugin `eventTypes` objects)
 */
function makeSimulator(eventType) {
  return function(domNode, eventData) {
    invariant(
      !React.isValidElement(domNode),
      'TestUtils.Simulate expected a DOM node as the first argument but received ' +
        'a React element. Pass the DOM node you wish to simulate the event on instead. ' +
        'Note that TestUtils.Simulate will not work if you are using shallow rendering.',
    );
    invariant(
      !isCompositeComponent(domNode),
      'TestUtils.Simulate expected a DOM node as the first argument but received ' +
        'a component instance. Pass the DOM node you wish to simulate the event on instead.',
    );
    const dispatchConfig = eventNameDispatchConfigs[eventType];
    const fakeNativeEvent = new Event();