Skip to content

Commit e5ee336

Browse files
committed
Add missing valid tests using exact Flow objects
1 parent 10e6a90 commit e5ee336

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/lib/rules/prefer-exact-props.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,23 @@ ruleTester.run('prefer-exact-props', rule, {
6767
}
6868
`,
6969
parser: 'babel-eslint'
70+
}, {
71+
code: `
72+
type Props = {|
73+
foo: string
74+
|}
75+
function Component(props: Props) {
76+
return <div />;
77+
}
78+
`,
79+
parser: 'babel-eslint'
80+
}, {
81+
code: `
82+
function Component(props: {| foo : string |}) {
83+
return <div />;
84+
}
85+
`,
86+
parser: 'babel-eslint'
7087
}, {
7188
code: `
7289
type Props = {}

0 commit comments

Comments
 (0)