Skip to content

Commit a87cc9b

Browse files
committed
Tests for jsx-wrap-multilines
1 parent ca162fd commit a87cc9b

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

tests/lib/rules/jsx-wrap-multilines.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,5 +1611,45 @@ ruleTester.run('jsx-wrap-multilines', rule, {
16111611
options: [{ declaration: 'parens-new-line' }],
16121612
errors: [{ messageId: 'missingParens' }],
16131613
},
1614+
{
1615+
code: `
1616+
export default () => <h1>
1617+
<span>
1618+
hello
1619+
</span>
1620+
</h1>;
1621+
`,
1622+
output: `
1623+
export default () => (
1624+
<h1>
1625+
<span>
1626+
hello
1627+
</span>
1628+
</h1>
1629+
);
1630+
`,
1631+
options: [{ arrow: 'parens-new-line' }],
1632+
errors: [{ messageId: 'missingParens' }],
1633+
},
1634+
{
1635+
code: `
1636+
export default () => (<h1>
1637+
<span>
1638+
hello
1639+
</span>
1640+
</h1>);
1641+
`,
1642+
output: `
1643+
export default () => (
1644+
<h1>
1645+
<span>
1646+
hello
1647+
</span>
1648+
</h1>
1649+
);
1650+
`,
1651+
options: [{ arrow: 'parens-new-line' }],
1652+
errors: [{ messageId: 'parensOnNewLines' }],
1653+
},
16141654
]),
16151655
});

0 commit comments

Comments
 (0)