Skip to content

Commit 21d9a20

Browse files
committed
[jsx-wrap-multilines] Better tests
1 parent 2bbd79c commit 21d9a20

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

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

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,29 +99,41 @@ const ARROW_NO_PAREN = `
9999
const CONDITION_SINGLE_LINE = 'foo ? <p>Hello</p> : null;';
100100

101101
const CONDITION_PAREN = `
102-
foo ? (<div>
103-
<p>Hello</p>
104-
</div>) : null;
102+
<div>
103+
{foo ? (<div>
104+
<p>Hello</p>
105+
</div>) : null}
106+
</div>
105107
`;
106108

107109
const CONDITION_NO_PAREN = `
108-
foo ? <div>
109-
<p>Hello</p>
110-
</div> : null;
110+
<div>
111+
{foo ? <div>
112+
<p>Hello</p>
113+
</div> : null}
114+
</div>
111115
`;
112116

113117
const LOGICAL_SINGLE_LINE = 'foo && <p>Hello</p>;';
114118

115119
const LOGICAL_PAREN = `
116-
foo && (<div>
117-
<p>Hello</p>
118-
</div>);
120+
<div>
121+
{foo &&
122+
(<div>
123+
<p>Hello World</p>
124+
</div>)
125+
}
126+
</div>
119127
`;
120128

121129
const LOGICAL_NO_PAREN = `
122-
foo && <div>
123-
<p>Hello</p>
124-
</div>;
130+
<div>
131+
{foo &&
132+
<div>
133+
<p>Hello World</p>
134+
</div>
135+
}
136+
</div>
125137
`;
126138

127139
const ATTR_SINGLE_LINE = '<div attr={<p>Hello</p>}></div>';

0 commit comments

Comments
 (0)