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 />;
        }
      };
      var instance = <Component bla={5} />;
      ReactTestUtils.renderIntoDocument(instance);
      expect(spy.calls.count()).toBe(1);
      expect(spy.calls.argsFor(0)[1]).toBe('num');
    });
    it('should have received the validator\'s return value', () => {
      spyOn(console, 'error');
      var spy = jasmine.createSpy().and.callFake(
        function(props, propName, componentName) {
          if (props[propName] !== 5) {
            return new Error('num must be 5!');
          }
        }
      );
      Component = class extends React.Component {
        static propTypes = {num: spy};
        render() {