Skip to content

Commit

Permalink
setup fragments for tests properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Belco90 committed Apr 26, 2022
1 parent 45500d2 commit e04af42
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/lib/rules/jsx-no-leaked-render.js
Expand Up @@ -132,14 +132,15 @@ ruleTester.run('jsx-no-leaked-render', rule, {
code: `
const Example = () => {
return (
<div>
<>
{0 && <Something/>}
{'' && <Something/>}
{NaN && <Something/>}
</div>
</>
)
}
`,
features: ['fragment'],
errors: [
{
message: 'Potential leaked value that might cause unintentionally rendered values or rendering crashes',
Expand All @@ -160,11 +161,11 @@ ruleTester.run('jsx-no-leaked-render', rule, {
output: `
const Example = () => {
return (
<div>
<>
{0 ? <Something/> : null}
{'' ? <Something/> : null}
{NaN ? <Something/> : null}
</div>
</>
)
}
`,
Expand Down

0 comments on commit e04af42

Please sign in to comment.