Right now we validate some of our proptype definitions, but we don't surface the issue until that component class is consumed. We should instead validate these, in `__DEV__` only as warnings when the class in created. This means that a call to `React.PropTypes.onOf('foo')` results in an immediate warning logged.

This is a relatively contained bit of code so would be a good candidate for somebody looking to start contributing to React.

},
        render: function() {
          return <div>{this.props.label}</div>;
        },
      });
    });
    it('should support components', () => {
      typeCheckPass(PropTypes.element, <div />);
    });
    it('should not support multiple components or scalar values', () => {
      var message = 'Invalid prop `testProp` supplied to `testComponent`, ' +
        'expected a single ReactElement.';
      typeCheckFail(PropTypes.element, [<div />, <div />], message);
      typeCheckFail(PropTypes.element, 123, message);
      typeCheckFail(PropTypes.element, 'foo', message);
      typeCheckFail(PropTypes.element, false, message);
    });
    it('should be able to define a single child as label', () => {
      spyOn(console, 'error');
      var instance = <Component label={<div />} />;
      instance = ReactTestUtils.renderIntoDocument(instance);
      expect(console.error.calls.count()).toBe(0);
    });
    it('should warn when passing no label and isRequired is set', () => {
      spyOn(console, 'error');
      var instance = <Component />;
      instance = ReactTestUtils.renderIntoDocument(instance);
      expect(console.error.calls.count()).toBe(1);
    });
    it('should be implicitly optional and not warn without values', function() {