Skip to content

Commit 225fcf7

Browse files
author
Yannick Croissant
committed
Add test case for object rest/spread
1 parent 93cbbe7 commit 225fcf7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/lib/rules/prop-types.js

+17
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,23 @@ ruleTester.run('prop-types', rule, {
705705
'});'
706706
].join('\n'),
707707
parser: 'babel-eslint'
708+
}, {
709+
code: [
710+
'var Hello = React.createClass({',
711+
' render: function() {',
712+
' let { a, ...b } = obj;',
713+
' let c = { ...d };',
714+
' return <div />;',
715+
' }',
716+
'});'
717+
].join('\n'),
718+
env: {
719+
es6: true
720+
},
721+
ecmaFeatures: {
722+
experimentalObjectRestSpread: true,
723+
jsx: true
724+
}
708725
}
709726
],
710727

0 commit comments

Comments
 (0)