It is a Jest-ism that shouldn't be in our open source package.
People using Jest can implement a similar pattern directly.
render() {
          return (
            <div>
              <input type="text" onChange={onChange} />
            </div>
          );
        }
      }
      const instance = ReactTestUtils.renderIntoDocument(<MyComponent />);
      const input = ReactTestUtils.findRenderedDOMComponentWithTag(
        instance,
        'input',
      );
      input.value = 'giraffe';
      ReactTestUtils.Simulate.change(input);
      expect(onChange).toHaveBeenCalledWith(
        expect.objectContaining({target: input}),
      );
    });
  });
  it('should call setState callback with no arguments', () => {
    let mockArgs;
    class Component extends React.Component {