Skip to content

Commit

Permalink
Add test using export const statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin Masters committed Aug 11, 2017
1 parent 663838b commit 3c76731
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/lib/rules/sort-prop-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,15 @@ ruleTester.run('sort-prop-types', rule, {
'};',
'TextFieldLabel.propTypes = propTypes;'
].join('\n')
}, {
code: [
'const First = (props) => <div />;',
'export const propTypes = {',
' a: PropTypes.any,',
' z: PropTypes.string,',
'};',
'First.propTypes = propTypes;'
].join('\n')
}],

invalid: [{
Expand Down

0 comments on commit 3c76731

Please sign in to comment.