Skip to content

Commit

Permalink
Add missing valid tests using exact Flow objects
Browse files Browse the repository at this point in the history
  • Loading branch information
jomasti committed Nov 19, 2017
1 parent 10e6a90 commit e5ee336
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/lib/rules/prefer-exact-props.js
Expand Up @@ -67,6 +67,23 @@ ruleTester.run('prefer-exact-props', rule, {
}
`,
parser: 'babel-eslint'
}, {
code: `
type Props = {|
foo: string
|}
function Component(props: Props) {
return <div />;
}
`,
parser: 'babel-eslint'
}, {
code: `
function Component(props: {| foo : string |}) {
return <div />;
}
`,
parser: 'babel-eslint'
}, {
code: `
type Props = {}
Expand Down

0 comments on commit e5ee336

Please sign in to comment.