Skip to content

Commit

Permalink
Test false positive component detection for destructured createElement
Browse files Browse the repository at this point in the history
  • Loading branch information
arian committed Mar 2, 2017
1 parent b646485 commit e102c44
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/lib/rules/display-name.js
Expand Up @@ -347,6 +347,17 @@ ruleTester.run('display-name', rule, {
ignoreTranspilerName: true
}],
parser: 'babel-eslint'
}, {
code: [
'import React, {createElement} from "react";',
'const SomeComponent = (props) => {',
' const {foo, bar} = props;',
' return someComponentFactory({',
' onClick: () => foo(bar("x"))',
' });',
'};'
].join('\n'),
parser: 'babel-eslint'
}, {
code: [
'import React, {Component} from "react";',
Expand Down

0 comments on commit e102c44

Please sign in to comment.