Skip to content

Commit eb8e3cb

Browse files
committed
Rewrite jsx-sort-props tests with template literals
1 parent 3847a2c commit eb8e3cb

File tree

1 file changed

+28
-26
lines changed

1 file changed

+28
-26
lines changed

tests/lib/rules/jsx-sort-props.js

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -201,32 +201,34 @@ ruleTester.run('jsx-sort-props', rule, {
201201
errors: 2
202202
},
203203
{
204-
code: [
205-
'<App',
206-
'a={true}',
207-
'z',
208-
'r',
209-
'_onClick={function(){}}',
210-
'onHandle={function(){}}',
211-
'{...this.props}',
212-
'b={false}',
213-
'{...otherProps}>',
214-
' {test}',
215-
'</App>'
216-
].join('\n'),
217-
output: [
218-
'<App',
219-
'_onClick={function(){}}',
220-
'a={true}',
221-
'onHandle={function(){}}',
222-
'r',
223-
'z',
224-
'{...this.props}',
225-
'b={false}',
226-
'{...otherProps}>',
227-
' {test}',
228-
'</App>'
229-
].join('\n'),
204+
code: `
205+
<App
206+
a={true}
207+
z
208+
r
209+
_onClick={function(){}}
210+
onHandle={function(){}}
211+
{...this.props}
212+
b={false}
213+
{...otherProps}
214+
>
215+
{test}
216+
</App>
217+
`,
218+
output: `
219+
<App
220+
_onClick={function(){}}
221+
a={true}
222+
onHandle={function(){}}
223+
r
224+
z
225+
{...this.props}
226+
b={false}
227+
{...otherProps}
228+
>
229+
{test}
230+
</App>
231+
`,
230232
errors: 3
231233
},
232234
{

0 commit comments

Comments
 (0)