This:

```js
createElement(<div />)
```

doesn't currently give a distinguishable message.

https://stackoverflow.com/questions/51110436/wrapping-provider-in-same-component-throws-element-type-is-invalid-expected-a-s

But we can easily detect it by checking for `$$typeof` and in that case suggest something more concrete (e.g. "Did you accidentally export JSX instead of a component?").
});
  it('should give context for PropType errors in nested components.', () => {
    
    
    
    function MyComp(props) {
      return React.createElement('div', null, 'My color is ' + props.color);
    }
    MyComp.propTypes = {
      color: PropTypes.string,
    };
    function ParentComp() {
      return React.createElement(MyComp, {color: 123});
    }
    expect(() => {
      ReactTestUtils.renderIntoDocument(React.createElement(ParentComp));
    }).toWarnDev(
      'Warning: Failed prop type: ' +
        'Invalid prop `color` of type `number` supplied to `MyComp`, ' +
        'expected `string`.\n' +
        '    in MyComp (created by ParentComp)\n' +
        '    in ParentComp',
    );
  });
  it('gives a helpful error when passing invalid types', () => {
    expect(() => {
      React.createElement(undefined);
      React.createElement(null);
      React.createElement(true);
      React.createElement({x: 17});