Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test case for #2051 #2068

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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