Skip to content

Commit

Permalink
Merge pull request #1045 from CarlRosell/fix-require-default-props
Browse files Browse the repository at this point in the history
Test for require-default-props rule filter of undefined exception
  • Loading branch information
ljharb committed Jan 29, 2017
2 parents e6fdd02 + 70cb06d commit 30e0206
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/lib/rules/require-default-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,16 @@ ruleTester.run('require-default-props', rule, {
].join('\n'),
parser: 'babel-eslint'
},
{
code: [
'type Props = any;',

'const Hello = function({ foo }: Props) {',
' return <div>Hello {foo}</div>;',
'};'
].join('\n'),
parser: 'babel-eslint'
},
{
code: [
'import type ImportedProps from "fake";',
Expand Down

0 comments on commit 30e0206

Please sign in to comment.