Skip to content

Commit

Permalink
Merge pull request #1332 from DianaSuvorova/issue_#1107
Browse files Browse the repository at this point in the history
`no-unused-prop-types`: add `.map` test case from #1107
  • Loading branch information
ljharb authored Jul 28, 2017
2 parents fe69b04 + caadc6a commit bd23406
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/lib/rules/no-unused-prop-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -1914,6 +1914,21 @@ ruleTester.run('no-unused-prop-types', rule, {
' test: React.PropTypes.bool',
'};'
].join('\n')
}, {
// issue 1107
code: [
'const Test = props => <div>',
' {someArray.map(l => <div',
' key={l}>',
' {props.property + props.property2}',
' </div>)}',
'</div>',

'Test.propTypes = {',
' property: React.propTypes.string.isRequired,',
' property2: React.propTypes.string.isRequired',
'}'
].join('\n')
}
],

Expand Down

0 comments on commit bd23406

Please sign in to comment.