Skip to content

Commit

Permalink
[Tests] prop-types: add passing test
Browse files Browse the repository at this point in the history
Closes #2017
  • Loading branch information
ljharb committed Feb 7, 2022
1 parent f47deef commit 67989c8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/lib/rules/prop-types.js
Expand Up @@ -3796,6 +3796,20 @@ ruleTester.run('prop-types', rule, {
{ object: 'PropTypes', property: 'exact', exact: true },
],
},
},
{
code: `
class Test extends React.Component {
componentDidUpdate() {
const {bar} = this.state;
console.log(bar);
}
render() {
return null;
}
}
`,
}
)),

Expand Down

0 comments on commit 67989c8

Please sign in to comment.