Skip to content

test(html-comment-indent): make tests more strict #2836

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 1 commit into from
Jul 30, 2025
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
80 changes: 64 additions & 16 deletions tests/lib/rules/html-comment-indent.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,22 +504,34 @@ tester.run('html-comment-indent', rule, {
{
message:
'Expected relative indentation of 2 spaces but found 0 spaces.',
line: 5
line: 5,
column: 11,
endLine: 5,
endColumn: 11
},
{
message:
'Expected relative indentation of 2 spaces but found 4 spaces.',
line: 7
line: 7,
column: 11,
endLine: 7,
endColumn: 15
},
{
message:
'Expected relative indentation of 0 spaces but found 2 spaces.',
line: 12
line: 12,
column: 11,
endLine: 12,
endColumn: 13
},
{
message:
'Expected base point indentation of 10 spaces, but found 8 spaces.',
line: 14
line: 14,
column: 1,
endLine: 14,
endColumn: 9
}
]
},
Expand All @@ -544,12 +556,18 @@ tester.run('html-comment-indent', rule, {
{
message:
'Expected relative indentation of 2 spaces but found 0 spaces.',
line: 4
line: 4,
column: 11,
endLine: 4,
endColumn: 11
},
{
message:
'Expected relative indentation of 2 spaces but found 4 spaces.',
line: 6
line: 6,
column: 11,
endLine: 6,
endColumn: 15
}
]
},
Expand All @@ -575,15 +593,24 @@ comment -->
errors: [
{
message: 'Expected indentation of 2 spaces but found 0 spaces.',
line: 4
line: 4,
column: 1,
endLine: 4,
endColumn: 1
},
{
message: 'Expected indentation of 2 spaces but found 0 spaces.',
line: 5
line: 5,
column: 1,
endLine: 5,
endColumn: 1
},
{
message: 'Expected indentation of 0 spaces but found 2 spaces.',
line: 7
line: 7,
column: 1,
endLine: 7,
endColumn: 3
}
]
},
Expand All @@ -610,17 +637,26 @@ comment -->
{
message:
'Expected base point indentation of 2 spaces, but not found.',
line: 4
line: 4,
column: 1,
endLine: 4,
endColumn: 1
},
{
message:
'Expected base point indentation of 2 spaces, but not found.',
line: 5
line: 5,
column: 1,
endLine: 5,
endColumn: 1
},
{
message:
'Expected base point indentation of 2 spaces, but not found.',
line: 7
line: 7,
column: 1,
endLine: 7,
endColumn: 1
}
]
},
Expand All @@ -643,12 +679,18 @@ comment -->
{
message:
'Expected relative indentation of 2 spaces but found 1 space.',
line: 4
line: 4,
column: 11,
endLine: 4,
endColumn: 12
},
{
message:
'Expected relative indentation of 0 spaces but found 1 space.',
line: 5
line: 5,
column: 11,
endLine: 5,
endColumn: 12
}
]
},
Expand All @@ -670,11 +712,17 @@ comment -->
errors: [
{
message: String.raw`Expected base point indentation of " \t \t \t ", but found 7 spaces.`,
line: 4
line: 4,
column: 1,
endLine: 4,
endColumn: 13
},
{
message: String.raw`Expected base point indentation of " \t \t \t ", but found 7 spaces.`,
line: 5
line: 5,
column: 1,
endLine: 5,
endColumn: 11
}
]
}
Expand Down