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 num={6} />;
      ReactTestUtils.renderIntoDocument(instance);
      expectDev(console.error.calls.count()).toBe(1);
      expect(
        console.error.calls.argsFor(0)[0].replace(/\(at .+?:\d+\)/g, '(at **)')
      ).toBe(
        'Warning: Failed prop type: num must be 5!\n' +
        '    in Component (at **)'
      );
    });
    it('should not warn if the validator returned null',
      () => {
        spyOn(console, 'error');
        var spy = jasmine.createSpy().and.callFake(
          function(props, propName, componentName) {
            return null;
          }
        );
        Component = class extends React.Component {
          static propTypes = {num: spy};
          render() {