From 05e8e7a0a0043e17ae4adc557847cb31664b172a Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Fri, 25 Jul 2025 20:49:34 +0200 Subject: [PATCH] test(html-comment-content-spacing): make tests more strict --- .../lib/rules/html-comment-content-spacing.js | 90 +++++++++++++++---- 1 file changed, 74 insertions(+), 16 deletions(-) diff --git a/tests/lib/rules/html-comment-content-spacing.js b/tests/lib/rules/html-comment-content-spacing.js index 1036555e8..754271d10 100644 --- a/tests/lib/rules/html-comment-content-spacing.js +++ b/tests/lib/rules/html-comment-content-spacing.js @@ -207,13 +207,15 @@ tester.run('html-comment-content-spacing', rule, { message: "Expected space after ''.", line: 3, column: 22, - endColumn: 22 + endColumn: 22, + endLine: 3 } ] }, @@ -234,13 +236,15 @@ tester.run('html-comment-content-spacing', rule, { message: "Unexpected space after ''.", line: 3, column: 23, - endColumn: 24 + endColumn: 24, + endLine: 3 } ] }, @@ -261,13 +265,15 @@ tester.run('html-comment-content-spacing', rule, { message: "Unexpected space after ''.", line: 3, column: 30, - endColumn: 38 + endColumn: 38, + endLine: 3 } ] }, @@ -281,8 +287,20 @@ tester.run('html-comment-content-spacing', rule, { output: null, options: ['always', { exceptions: ['+'] }], errors: [ - 'Expected space after exception block.', - 'Expected space before exception block.' + { + message: 'Expected space after exception block.', + line: 3, + column: 31, + endLine: 3, + endColumn: 31 + }, + { + message: 'Expected space before exception block.', + line: 3, + column: 38, + endLine: 3, + endColumn: 38 + } ] }, { @@ -294,8 +312,20 @@ tester.run('html-comment-content-spacing', rule, { output: null, options: ['always', { exceptions: ['*'] }], errors: [ - 'Expected space after exception block.', - 'Expected space before exception block.' + { + message: 'Expected space after exception block.', + line: 3, + column: 20, + endLine: 3, + endColumn: 20 + }, + { + message: 'Expected space before exception block.', + line: 3, + column: 27, + endLine: 3, + endColumn: 27 + } ] }, { @@ -311,8 +341,20 @@ tester.run('html-comment-content-spacing', rule, { `, options: ['always', { exceptions: ['#+#-'] }], errors: [ - 'Expected space after exception block.', - "Expected space before '-->'." + { + message: 'Expected space after exception block.', + line: 3, + column: 27, + endLine: 3, + endColumn: 27 + }, + { + message: "Expected space before '-->'.", + line: 3, + column: 38, + endLine: 3, + endColumn: 38 + } ] }, { @@ -324,11 +366,19 @@ tester.run('html-comment-content-spacing', rule, { output: null, options: ['always', { exceptions: ['*', '++'] }], errors: [ - 'Expected space after exception block.', + { + message: 'Expected space after exception block.', + line: 3, + column: 20, + endLine: 3, + endColumn: 20 + }, { message: 'Expected space before exception block.', line: 3, - column: 27 + column: 27, + endLine: 3, + endColumn: 27 } ] }, @@ -341,11 +391,19 @@ tester.run('html-comment-content-spacing', rule, { output: null, options: ['always', { exceptions: ['*', '++'] }], errors: [ - 'Expected space after exception block.', + { + message: 'Expected space after exception block.', + line: 3, + column: 20, + endLine: 3, + endColumn: 20 + }, { message: 'Expected space before exception block.', line: 3, - column: 28 + column: 28, + endLine: 3, + endColumn: 28 } ] }