Skip to content

Commit

Permalink
[fix]: add constructor & static-variable test to valid
Browse files Browse the repository at this point in the history
  • Loading branch information
vedadeepta committed Sep 11, 2019
1 parent 29ebd7a commit 0fac5c2
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/lib/rules/sort-comp.js
Expand Up @@ -596,6 +596,33 @@ ruleTester.run('sort-comp', rule, {
'instance-variables'
]
}]
}, {
code: `
class MyComponent extends React.Component {
static foo = 1;
bar;
constructor() {
super(props);
this.state = {};
}
render() {
return null;
}
}
`,
parser: parsers.BABEL_ESLINT,
options: [{
order: [
'static-variables',
'instance-variables',
'constructor',
'everything-else',
'render'
]
}]
}],

invalid: [{
Expand Down

0 comments on commit 0fac5c2

Please sign in to comment.