Skip to content

Commit

Permalink
[Tests] failing test for “don't error if it's not a React Component”
Browse files Browse the repository at this point in the history
  • Loading branch information
Kent C. Dodds authored and ljharb committed Jul 2, 2018
1 parent 716154a commit 6f2ac7a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/lib/rules/no-access-state-in-setstate.js
Expand Up @@ -101,6 +101,15 @@ ruleTester.run('no-access-state-in-setstate', rule, {
};
`,
parserOptions: parserOptions
}, {
code: [
'class StateContainer extends Container {',
' anything() {',
' return this.setState({value: this.state.value + 1})',
' }',
'};'
].join('\n'),
parserOptions: parserOptions
}],

invalid: [{
Expand Down

0 comments on commit 6f2ac7a

Please sign in to comment.