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.

undefined,
        requiredMessage
      );
    });
  });
  describe('OneOf Types', function() {
    it('should fail for invalid argument', function() {
      typeCheckFail(
        PropTypes.oneOf('red', 'blue'),
        'red',
        'Invalid argument supplied to oneOf, expected an instance of array.'
      );
    });
    it('should warn for invalid values', function() {
      typeCheckFail(
        PropTypes.oneOf(['red', 'blue']),
        true,
        'Invalid prop `testProp` of value `true` supplied to ' +
        '`testComponent`, expected one of ["red","blue"].'
      );
      typeCheckFail(
        PropTypes.oneOf(['red', 'blue']),
        [],
        'Invalid prop `testProp` of value `` supplied to `testComponent`, ' +
        'expected one of ["red","blue"].'
      );
      typeCheckFail(
        PropTypes.oneOf(['red', 'blue']),
        '',
        'Invalid prop `testProp` of value `` supplied to `testComponent`, ' +