Skip to content

Commit 70dccbe

Browse files
committed
[Tests] prop-types: add passing test
Closes #1575
1 parent 4e1dd9a commit 70dccbe

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/lib/rules/prop-types.js

+21
Original file line numberDiff line numberDiff line change
@@ -3775,6 +3775,27 @@ ruleTester.run('prop-types', rule, {
37753775
/>
37763776
`,
37773777
features: ['flow'],
3778+
},
3779+
{
3780+
code: `
3781+
class App extends React.Component {
3782+
render() {
3783+
return (
3784+
<h1>Open the console</h1>
3785+
)
3786+
}
3787+
}
3788+
3789+
// does not work
3790+
App.propTypes = PropTypes.exact({
3791+
foo: PropTypes.object,
3792+
});
3793+
`,
3794+
settings: {
3795+
propWrapperFunctions: [
3796+
{ object: 'PropTypes', property: 'exact', exact: true },
3797+
],
3798+
},
37783799
}
37793800
)),
37803801

0 commit comments

Comments
 (0)