Skip to content

Commit 3c76731

Browse files
author
Dustin Masters
committed
Add test using export const statement
1 parent 663838b commit 3c76731

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/lib/rules/sort-prop-types.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,15 @@ ruleTester.run('sort-prop-types', rule, {
316316
'};',
317317
'TextFieldLabel.propTypes = propTypes;'
318318
].join('\n')
319+
}, {
320+
code: [
321+
'const First = (props) => <div />;',
322+
'export const propTypes = {',
323+
' a: PropTypes.any,',
324+
' z: PropTypes.string,',
325+
'};',
326+
'First.propTypes = propTypes;'
327+
].join('\n')
319328
}],
320329

321330
invalid: [{

0 commit comments

Comments
 (0)