Skip to content

Commit

Permalink
[Tests] prop-types: add passing test
Browse files Browse the repository at this point in the history
Closes #3103
  • Loading branch information
ljharb committed Oct 22, 2021
1 parent 42f23b3 commit 86b3712
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/lib/rules/prop-types.js
Expand Up @@ -3423,6 +3423,20 @@ ruleTester.run('prop-types', rule, {
}
}
`,
},
{
code: `
class Test extends React.Component {
static propTypes = {
value: PropTypes.string
};
render() {
return <span>{this.props.value}</span>;
}
}
`,
features: ['class fields'],
}
)),

Expand Down

0 comments on commit 86b3712

Please sign in to comment.