Skip to content

Commit

Permalink
test(sort-prop-types) Add failing test for when sortShapeProp is tr…
Browse files Browse the repository at this point in the history
…ue and shape not object literal
  • Loading branch information
justinanastos committed Jan 31, 2018
1 parent 5e1a64c commit d8dff26
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/lib/rules/sort-prop-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,24 @@ ruleTester.run('sort-prop-types', rule, {
options: [{
sortShapeProp: true
}]
}, {
code: `
class Component extends React.Component {
render() {
return <div />;
}
}
Component.propTypes = {
a: PropTypes.any,
b: PropTypes.any,
c: PropTypes.shape(
importedPropType,
),
};
`,
options: [{
sortShapeProp: true
}]
}],

invalid: [{
Expand Down

0 comments on commit d8dff26

Please sign in to comment.