Skip to content

Commit

Permalink
[Tests] prop-types: Test case for jsx-eslint#2051
Browse files Browse the repository at this point in the history
  • Loading branch information
alexzherdev authored and ljharb committed Dec 2, 2018
1 parent 5877629 commit d5b06e7
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/lib/rules/prop-types.js
Expand Up @@ -2066,6 +2066,31 @@ ruleTester.run('prop-types', rule, {
};
`,
settings: {react: {version: '16.3.0'}}
},
// issue #2051
{
code: `
import React from 'react';
import PropTypes from 'prop-types';
import makeHoc from './make-hoc';
import selectors from './selectors';
class Foo extends React.Component {
render() {
return this.props.children;
}
}
Foo.propTypes = {
children: PropTypes.element.isRequired
};
export const Unconnected = Foo;
export default makeHoc(
Foo,
selectors
);
`
}
],

Expand Down

0 comments on commit d5b06e7

Please sign in to comment.