Skip to content

test(html-closing-bracket-newline): make tests more strict #2832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 148 additions & 23 deletions tests/lib/rules/html-closing-bracket-newline.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,22 @@ tester.run('html-closing-bracket-newline', rule, {
</template>
`,
errors: [
'Expected no line breaks before closing bracket, but 1 line break found.',
'Expected no line breaks before closing bracket, but 2 line breaks found.'
{
message:
'Expected no line breaks before closing bracket, but 1 line break found.',
line: 3,
column: 15,
endLine: 4,
endColumn: 11
},
{
message:
'Expected no line breaks before closing bracket, but 2 line breaks found.',
line: 4,
column: 17,
endLine: 6,
endColumn: 11
}
]
},
{
Expand All @@ -195,7 +209,14 @@ tester.run('html-closing-bracket-newline', rule, {
</template>
`,
errors: [
'Expected 1 line break before closing bracket, but no line breaks found.'
{
message:
'Expected 1 line break before closing bracket, but no line breaks found.',
line: 4,
column: 18,
endLine: 4,
endColumn: 18
}
]
},
{
Expand All @@ -219,8 +240,22 @@ tester.run('html-closing-bracket-newline', rule, {
}
],
errors: [
'Expected no line breaks before closing bracket, but 1 line break found.',
'Expected no line breaks before closing bracket, but 2 line breaks found.'
{
message:
'Expected no line breaks before closing bracket, but 1 line break found.',
line: 3,
column: 15,
endLine: 4,
endColumn: 11
},
{
message:
'Expected no line breaks before closing bracket, but 2 line breaks found.',
line: 4,
column: 17,
endLine: 6,
endColumn: 11
}
]
},
{
Expand All @@ -246,7 +281,14 @@ tester.run('html-closing-bracket-newline', rule, {
}
],
errors: [
'Expected no line breaks before closing bracket, but 1 line break found.'
{
message:
'Expected no line breaks before closing bracket, but 1 line break found.',
line: 4,
column: 18,
endLine: 5,
endColumn: 13
}
]
},
{
Expand All @@ -272,7 +314,14 @@ tester.run('html-closing-bracket-newline', rule, {
}
],
errors: [
'Expected 1 line break before closing bracket, but no line breaks found.'
{
message:
'Expected 1 line break before closing bracket, but no line breaks found.',
line: 4,
column: 18,
endLine: 4,
endColumn: 18
}
]
},
{
Expand All @@ -297,8 +346,22 @@ tester.run('html-closing-bracket-newline', rule, {
}
],
errors: [
'Expected no line breaks before closing bracket, but 1 line break found.',
'Expected no line breaks before closing bracket, but 1 line break found.'
{
message:
'Expected no line breaks before closing bracket, but 1 line break found.',
line: 3,
column: 21,
endLine: 4,
endColumn: 11
},
{
message:
'Expected no line breaks before closing bracket, but 1 line break found.',
line: 5,
column: 16,
endLine: 6,
endColumn: 11
}
]
},
{
Expand Down Expand Up @@ -329,8 +392,22 @@ tester.run('html-closing-bracket-newline', rule, {
}
],
errors: [
'Expected no line breaks before closing bracket, but 1 line break found.',
'Expected 1 line break before closing bracket, but no line breaks found.'
{
message:
'Expected no line breaks before closing bracket, but 1 line break found.',
line: 5,
column: 18,
endLine: 6,
endColumn: 13
},
{
message:
'Expected 1 line break before closing bracket, but no line breaks found.',
line: 7,
column: 16,
endLine: 7,
endColumn: 16
}
]
},
{
Expand Down Expand Up @@ -359,8 +436,22 @@ tester.run('html-closing-bracket-newline', rule, {
}
],
errors: [
'Expected 1 line break before closing bracket, but no line breaks found.',
'Expected 1 line break before closing bracket, but no line breaks found.'
{
message:
'Expected 1 line break before closing bracket, but no line breaks found.',
line: 4,
column: 21,
endLine: 4,
endColumn: 21
},
{
message:
'Expected 1 line break before closing bracket, but no line breaks found.',
line: 5,
column: 16,
endLine: 5,
endColumn: 16
}
]
},
{
Expand Down Expand Up @@ -474,42 +565,48 @@ tester.run('html-closing-bracket-newline', rule, {
'Expected 1 line break before closing bracket, but no line breaks found.',
line: 2,
column: 18,
endColumn: 18
endColumn: 18,
endLine: 2
},
{
message:
'Expected 1 line break before closing bracket, but no line breaks found.',
line: 3,
column: 19,
endColumn: 19
endColumn: 19,
endLine: 3
},
{
message:
'Expected 1 line break before closing bracket, but no line breaks found.',
line: 4,
column: 16,
endColumn: 16
endColumn: 16,
endLine: 4
},
{
message:
'Expected 1 line break before closing bracket, but no line breaks found.',
line: 5,
column: 17,
endColumn: 17
endColumn: 17,
endLine: 5
},
{
message:
'Expected 1 line break before closing bracket, but no line breaks found.',
line: 6,
column: 15,
endColumn: 15
endColumn: 15,
endLine: 6
},
{
message:
'Expected 1 line break before closing bracket, but no line breaks found.',
line: 6,
column: 23,
endColumn: 23
endColumn: 23,
endLine: 6
}
]
},
Expand All @@ -534,7 +631,14 @@ tester.run('html-closing-bracket-newline', rule, {
}
],
errors: [
'Expected no line breaks before closing bracket, but 1 line break found.'
{
message:
'Expected no line breaks before closing bracket, but 1 line break found.',
line: 3,
column: 18,
endLine: 4,
endColumn: 11
}
]
},
{
Expand All @@ -560,7 +664,14 @@ tester.run('html-closing-bracket-newline', rule, {
}
],
errors: [
'Expected 1 line break before closing bracket, but no line breaks found.'
{
message:
'Expected 1 line break before closing bracket, but no line breaks found.',
line: 4,
column: 23,
endLine: 4,
endColumn: 23
}
]
},
{
Expand All @@ -584,7 +695,14 @@ tester.run('html-closing-bracket-newline', rule, {
}
],
errors: [
'Expected 1 line break before closing bracket, but no line breaks found.'
{
message:
'Expected 1 line break before closing bracket, but no line breaks found.',
line: 3,
column: 29,
endLine: 3,
endColumn: 29
}
]
},
{
Expand All @@ -610,7 +728,14 @@ tester.run('html-closing-bracket-newline', rule, {
}
],
errors: [
'Expected no line breaks before closing bracket, but 1 line break found.'
{
message:
'Expected no line breaks before closing bracket, but 1 line break found.',
line: 4,
column: 23,
endLine: 5,
endColumn: 11
}
]
}
]
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy