After a discussion with @spicyj we decided to keep the warning even though the functions will throw in production. The warning is the only way to learn about that.

We should also document how to pass the secret through in case you know what you're doing.

return <div>{this.props.label}</div>;
        }
      };
    });
    it('should support components', () => {
      typeCheckPass(PropTypes.element, <div />);
    });
    it('should not support multiple components or scalar values', () => {
      typeCheckFail(
        PropTypes.element,
        [<div />, <div />],
        'Invalid prop `testProp` of type `array` supplied to `testComponent`, ' +
        'expected a single ReactElement.'
      );
      typeCheckFail(
        PropTypes.element,
        123,
        'Invalid prop `testProp` of type `number` supplied to `testComponent`, ' +
        'expected a single ReactElement.'
      );
      typeCheckFail(
        PropTypes.element,
        'foo',
        'Invalid prop `testProp` of type `string` supplied to `testComponent`, ' +
        'expected a single ReactElement.'
      );