Skip to content

Commit 0f2e891

Browse files
committed
[Tests] no-unused-prop-types: add passing test
Closes #2171
1 parent 6255ca6 commit 0f2e891

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/lib/rules/no-unused-prop-types.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3934,6 +3934,17 @@ ruleTester.run('no-unused-prop-types', rule, {
39343934
`,
39353935
features: ['class fields', 'types'],
39363936
},
3937+
{
3938+
code: `
3939+
function Foo (props) {
3940+
return <div>{ renderPhoto() }</div>;
3941+
3942+
function renderPhoto () {
3943+
return <div>{ props.renderPhotoTools() }</div>;
3944+
}
3945+
}
3946+
`,
3947+
},
39373948
]),
39383949

39393950
invalid: parsers.all([].concat(

0 commit comments

Comments
 (0)