Skip to content

Commit 9e6e75b

Browse files
committed
Rewrite jsx-curly-brace-presence tests with template literals
1 parent 330368b commit 9e6e75b

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

tests/lib/rules/jsx-closing-tag-location.js

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,39 +27,39 @@ const MESSAGE_OWN_LINE = [{message: 'Closing tag of a multiline JSX expression m
2727
const ruleTester = new RuleTester({parserOptions});
2828
ruleTester.run('jsx-closing-tag-location', rule, {
2929
valid: [{
30-
code: [
31-
'<App>',
32-
' foo',
33-
'</App>'
34-
].join('\n')
30+
code: `
31+
<App>
32+
foo
33+
</App>
34+
`
3535
}, {
36-
code: [
37-
'<App>foo</App>'
38-
].join('\n')
36+
code: `
37+
<App>foo</App>
38+
`
3939
}],
4040

4141
invalid: [{
42-
code: [
43-
'<App>',
44-
' foo',
45-
' </App>'
46-
].join('\n'),
47-
output: [
48-
'<App>',
49-
' foo',
50-
'</App>'
51-
].join('\n'),
42+
code: `
43+
<App>
44+
foo
45+
</App>
46+
`,
47+
output: `
48+
<App>
49+
foo
50+
</App>
51+
`,
5252
errors: MESSAGE_MATCH_INDENTATION
5353
}, {
54-
code: [
55-
'<App>',
56-
' foo</App>'
57-
].join('\n'),
58-
output: [
59-
'<App>',
60-
' foo',
61-
'</App>'
62-
].join('\n'),
54+
code: `
55+
<App>
56+
foo</App>
57+
`,
58+
output: `
59+
<App>
60+
foo
61+
</App>
62+
`,
6363
errors: MESSAGE_OWN_LINE
6464
}]
6565
});

0 commit comments

Comments
 (0)