Skip to content

Commit

Permalink
Add failing test for #516
Browse files Browse the repository at this point in the history
  • Loading branch information
inyono committed Mar 29, 2016
1 parent 456a75f commit 68e6acd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/lib/rules/prefer-stateless-function.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,16 @@ ruleTester.run('prefer-stateless-function', rule, {
'});'
].join('\n'),
parserOptions: parserOptions
}, {
// Can return null (shorthand if in return)
code: [
'class Foo extends React.Component {',
' render() {',
' return true ? <div /> : null;',
' }',
'}'
].join('\n'),
parser: 'babel-eslint'
}, {
code: [
'export default (Component) => (',
Expand Down

0 comments on commit 68e6acd

Please sign in to comment.