Skip to content

Commit 42eaadc

Browse files
committed
[Tests] prop-types: add passing test
Closes #782
1 parent 7bb491d commit 42eaadc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/lib/rules/prop-types.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3687,6 +3687,22 @@ ruleTester.run('prop-types', rule, {
36873687
}
36883688
`,
36893689
features: ['types'],
3690+
},
3691+
{
3692+
code: `
3693+
import React, {PropTypes} from 'react'
3694+
3695+
function Foo({bar}) {
3696+
const {baz} = Foo
3697+
return <div>{baz} {bar}</div>
3698+
}
3699+
3700+
Foo.propTypes = {
3701+
bar: PropTypes.string.isRequired,
3702+
}
3703+
3704+
Foo.baz = 'hi'
3705+
`,
36903706
}
36913707
)),
36923708

0 commit comments

Comments
 (0)