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.

'expected one of ["red","blue"].'
      );
      typeCheckFail(
        PropTypes.oneOf([0, 'false']),
        false,
        'Invalid prop `testProp` of value `false` supplied to ' +
        '`testComponent`, expected one of [0,"false"].'
      );
    });
    it('should not warn for valid values', function() {
      typeCheckPass(PropTypes.oneOf(['red', 'blue']), 'red');
      typeCheckPass(PropTypes.oneOf(['red', 'blue']), 'blue');
      typeCheckPass(PropTypes.oneOf(['red', 'blue', NaN]), NaN);
    });
    it('should be implicitly optional and not warn without values', function() {
      typeCheckPass(PropTypes.oneOf(['red', 'blue']), null);
      typeCheckPass(PropTypes.oneOf(['red', 'blue']), undefined);
    });
    it('should warn for missing required values', function() {
      typeCheckFail(
        PropTypes.oneOf(['red', 'blue']).isRequired,
        null,
        requiredMessage
      );
      typeCheckFail(
        PropTypes.oneOf(['red', 'blue']).isRequired,
        undefined,
        requiredMessage
      );
    });