From afaec97fcebd178b7c141ef57800f24d5fe18629 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Fri, 18 Jul 2025 23:17:46 +0200 Subject: [PATCH] test(block-spacing): make tests more strict --- tests/lib/rules/block-spacing.js | 42 ++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/tests/lib/rules/block-spacing.js b/tests/lib/rules/block-spacing.js index 6cc3114a7..a0a5a6723 100644 --- a/tests/lib/rules/block-spacing.js +++ b/tests/lib/rules/block-spacing.js @@ -37,7 +37,10 @@ tester.run('block-spacing', rule, { token: '{' }, // message: 'Requires a space after \'{\'', - line: 3 + line: 3, + column: 38, + endLine: 3, + endColumn: 39 }, { messageId: 'missing', @@ -46,7 +49,10 @@ tester.run('block-spacing', rule, { token: '}' }, // message: 'Requires a space before \'}\'', - line: 3 + line: 3, + column: 51, + endLine: 3, + endColumn: 52 } ] }, @@ -67,7 +73,10 @@ tester.run('block-spacing', rule, { token: '{' }, // message: 'Requires a space after \'{\'', - line: 3 + line: 3, + column: 33, + endLine: 3, + endColumn: 34 }, { messageId: 'missing', @@ -76,7 +85,10 @@ tester.run('block-spacing', rule, { token: '}' }, // message: 'Requires a space before \'}\'', - line: 3 + line: 3, + column: 46, + endLine: 3, + endColumn: 47 } ] }, @@ -98,7 +110,10 @@ tester.run('block-spacing', rule, { token: '{' }, // message: 'Unexpected space(s) after \'{\'', - line: 3 + line: 3, + column: 39, + endLine: 3, + endColumn: 40 }, { messageId: 'extra', @@ -107,7 +122,10 @@ tester.run('block-spacing', rule, { token: '}' }, // message: 'Unexpected space(s) before \'}\'', - line: 3 + line: 3, + column: 52, + endLine: 3, + endColumn: 53 } ] }, @@ -121,16 +139,24 @@ tester.run('block-spacing', rule, { data: { location: 'after', token: '{' - } + }, // message: 'Requires a space after \'{\'', + line: 1, + column: 57, + endLine: 1, + endColumn: 58 }, { messageId: 'missing', data: { location: 'before', token: '}' - } + }, // message: 'Requires a space before \'}\'', + line: 1, + column: 67, + endLine: 1, + endColumn: 68 } ] } 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