diff --git a/tests/lib/rules/no-unused-prop-types.js b/tests/lib/rules/no-unused-prop-types.js index f52371766a..9a98ebd05b 100644 --- a/tests/lib/rules/no-unused-prop-types.js +++ b/tests/lib/rules/no-unused-prop-types.js @@ -1929,6 +1929,49 @@ ruleTester.run('no-unused-prop-types', rule, { ' property2: React.propTypes.string.isRequired', '}' ].join('\n') + }, { + // issue 811 + code: [ + 'const Button = React.createClass({', + 'displayName: "Button",', + + 'propTypes: {', + ' name: React.PropTypes.string.isRequired,', + ' isEnabled: React.PropTypes.bool.isRequired', + '},', + + 'render() {', + ' const item = this.props;', + ' const disabled = !this.props.isEnabled;', + ' return (', + '