Skip to content

Commit

Permalink
[Tests] sort-comp: add passing test
Browse files Browse the repository at this point in the history
Closes #3127
  • Loading branch information
ljharb committed Feb 22, 2022
1 parent d000177 commit 69ac0a0
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/lib/rules/sort-comp.js
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,32 @@ ruleTester.run('sort-comp', rule, {
},
],
},
{
code: `
class ClassName extends React.Component {
static defaultProps = {};
static parseDateString(date?: Date) {}
state = {};
render() {
return <div />;
}
}
`,
features: ['types'],
options: [
{
order: [
'static-variables',
'static-methods',
'type-annotations',
'instance-variables',
'lifecycle',
'everything-else',
'render',
],
},
],
},
]),

invalid: parsers.all([
Expand Down

0 comments on commit 69ac0a0

Please sign in to comment.