Skip to content

Commit 0a57e3d

Browse files
committed
[Tests] no-unused-prop-types: add passing test
See #2173 (comment)
1 parent 0f2e891 commit 0a57e3d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/lib/rules/no-unused-prop-types.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3945,6 +3945,21 @@ ruleTester.run('no-unused-prop-types', rule, {
39453945
}
39463946
`,
39473947
},
3948+
{
3949+
code: `
3950+
const Wrapper = featureToggle
3951+
? ({ children }: { children: Node }) => (
3952+
<FeatureToggledComponent
3953+
featureToggle={featureToggle}
3954+
defaultValue
3955+
>
3956+
{children}
3957+
</FeatureToggledComponent>
3958+
)
3959+
: React.Fragment;
3960+
`,
3961+
features: ['types'],
3962+
},
39483963
]),
39493964

39503965
invalid: parsers.all([].concat(

0 commit comments

Comments
 (0)