Skip to content

Commit

Permalink
[Tests] no-unused-prop-types: add passing test
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Feb 18, 2022
1 parent 0f2e891 commit 0a57e3d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/lib/rules/no-unused-prop-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -3945,6 +3945,21 @@ ruleTester.run('no-unused-prop-types', rule, {
}
`,
},
{
code: `
const Wrapper = featureToggle
? ({ children }: { children: Node }) => (
<FeatureToggledComponent
featureToggle={featureToggle}
defaultValue
>
{children}
</FeatureToggledComponent>
)
: React.Fragment;
`,
features: ['types'],
},
]),

invalid: parsers.all([].concat(
Expand Down

0 comments on commit 0a57e3d

Please sign in to comment.