From 5b090f1f9f8168eb85bbdce2d886d81db113688a Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Fri, 25 Jul 2025 19:00:00 +0200 Subject: [PATCH] test(html-closing-bracket-newline): make tests more strict --- .../lib/rules/html-closing-bracket-newline.js | 171 +++++++++++++++--- 1 file changed, 148 insertions(+), 23 deletions(-) diff --git a/tests/lib/rules/html-closing-bracket-newline.js b/tests/lib/rules/html-closing-bracket-newline.js index faf898bc5..37aaa41d2 100644 --- a/tests/lib/rules/html-closing-bracket-newline.js +++ b/tests/lib/rules/html-closing-bracket-newline.js @@ -174,8 +174,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 + } ] }, { @@ -195,7 +209,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 + } ] }, { @@ -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 + } ] }, { @@ -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 + } ] }, { @@ -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 + } ] }, { @@ -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 + } ] }, { @@ -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 + } ] }, { @@ -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 + } ] }, { @@ -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 } ] }, @@ -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 + } ] }, { @@ -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 + } ] }, { @@ -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 + } ] }, { @@ -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 + } ] } ] 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