Skip to content

Commit

Permalink
Added unit test for oneOfType with non-complex type possibilties
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebMorris committed Jul 15, 2015
1 parent 7e09de1 commit 6296ca3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/lib/rules/prop-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,25 @@ eslintTester.addRuleTest('lib/rules/prop-types', {
classes: true,
jsx: true
}
}, {
code: [
'class Hello extends React.Component {',
' render() {',
' this.props.a.length;',
' return <div>Hello</div>;',
' }',
'}',
'Hello.propTypes = {',
' a: React.PropTypes.oneOfType([',
' React.PropTypes.array,',
' React.PropTypes.string',
' ])',
'};'
].join('\n'),
ecmaFeatures: {
classes: true,
jsx: true
}
}, {
code: [
'class Hello extends React.Component {',
Expand Down

0 comments on commit 6296ca3

Please sign in to comment.