Skip to content

Commit 67989c8

Browse files
committed
[Tests] prop-types: add passing test
Closes #2017
1 parent f47deef commit 67989c8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/lib/rules/prop-types.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3796,6 +3796,20 @@ ruleTester.run('prop-types', rule, {
37963796
{ object: 'PropTypes', property: 'exact', exact: true },
37973797
],
37983798
},
3799+
},
3800+
{
3801+
code: `
3802+
class Test extends React.Component {
3803+
componentDidUpdate() {
3804+
const {bar} = this.state;
3805+
console.log(bar);
3806+
}
3807+
3808+
render() {
3809+
return null;
3810+
}
3811+
}
3812+
`,
37993813
}
38003814
)),
38013815

0 commit comments

Comments
 (0)