Skip to content

Commit dc729fa

Browse files
committed
[jsx-wrap-multilines] Return invalid tests
1 parent a05c589 commit dc729fa

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const RETURN_NO_PAREN = `
5151
}
5252
});
5353
`;
54+
5455
const DECLARATION_TERNARY_SINGLE_LINE = 'var hello = foo ? <p>Hello</p> : <p>Hi</p>;';
5556

5657
const DECLARATION_TERNARY_PAREN = `
@@ -282,6 +283,20 @@ ruleTester.run('jsx-wrap-multilines', rule, {
282283
output: RETURN_PAREN,
283284
options: [{return: true}],
284285
errors: [{message: 'Missing parentheses around multilines JSX'}]
286+
}, {
287+
code: DECLARATION_TERNARY_NO_PAREN,
288+
output: DECLARATION_TERNARY_PAREN,
289+
errors: [
290+
{message: 'Missing parentheses around multilines JSX'},
291+
{message: 'Missing parentheses around multilines JSX'}
292+
]
293+
}, {
294+
code: ASSIGNMENT_TERNARY_NO_PAREN,
295+
output: ASSIGNMENT_TERNARY_PAREN,
296+
errors: [
297+
{message: 'Missing parentheses around multilines JSX'},
298+
{message: 'Missing parentheses around multilines JSX'}
299+
]
285300
}, {
286301
code: DECLARATION_NO_PAREN,
287302
output: DECLARATION_PAREN,

0 commit comments

Comments
 (0)