Skip to content

Commit

Permalink
Add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Moong0122 committed Sep 16, 2020
1 parent cd75b19 commit eda8e23
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions tests/lib/rules/jsx-closing-bracket-location.js
Expand Up @@ -1731,5 +1731,39 @@ ruleTester.run('jsx-closing-bracket-location', rule, {
line: 3,
column: 3
}]
}, {
code: [
' <App',
' foo',
'\t\t/>'
].join('\n'),
output: [
' <App',
' foo',
' />'
].join('\n'),
options: [{location: 'tag-aligned'}],
errors: [{
message: messageWithDetails(MESSAGE_TAG_ALIGNED, 3, false),
line: 3,
column: 3
}]
}, {
code: [
'\t\t<App',
'\t\t\tfoo',
' />'
].join('\n'),
output: [
'\t\t<App',
'\t\t\tfoo',
'\t\t/>'
].join('\n'),
options: [{location: 'tag-aligned'}],
errors: [{
message: messageWithDetails(MESSAGE_TAG_ALIGNED, 3, false),
line: 3,
column: 3
}]
}]
});

0 comments on commit eda8e23

Please sign in to comment.