Skip to content

Commit a34a232

Browse files
committed
[Tests] prop-types: add passing test
Closes #2196
1 parent 0a57e3d commit a34a232

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/lib/rules/prop-types.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3825,6 +3825,21 @@ ruleTester.run('prop-types', rule, {
38253825
name: PropTypes.string.isRequired,
38263826
};
38273827
`,
3828+
},
3829+
{
3830+
code: `
3831+
const SomeComponent = (props) => {
3832+
function renderComponent() {
3833+
return <div>{props.name}</div>
3834+
}
3835+
3836+
return renderComponent();
3837+
}
3838+
3839+
SomeComponent.propTypes = {
3840+
name: PropTypes.string
3841+
}
3842+
`,
38283843
}
38293844
)),
38303845

0 commit comments

Comments
 (0)