Skip to content

Commit e27e405

Browse files
committed
test(keyword-spacing): make tests more strict
1 parent 0720339 commit e27e405

File tree

1 file changed

+44
-11
lines changed

1 file changed

+44
-11
lines changed

tests/lib/rules/keyword-spacing.js

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,38 @@ tester.run('keyword-spacing', rule, {
6868
errors: [
6969
{
7070
message: 'Expected space(s) after "if".',
71-
line: 3
71+
line: 3,
72+
column: 11,
73+
endLine: 3,
74+
endColumn: 13
7275
},
7376
{
7477
message: 'Expected space(s) before "else".',
75-
line: 5
78+
line: 5,
79+
column: 12,
80+
endLine: 5,
81+
endColumn: 16
7682
},
7783
{
7884
message: 'Expected space(s) after "if".',
79-
line: 5
85+
line: 5,
86+
column: 17,
87+
endLine: 5,
88+
endColumn: 19
8089
},
8190
{
8291
message: 'Expected space(s) before "else".',
83-
line: 7
92+
line: 7,
93+
column: 12,
94+
endLine: 7,
95+
endColumn: 16
8496
},
8597
{
8698
message: 'Expected space(s) after "else".',
87-
line: 7
99+
line: 7,
100+
column: 12,
101+
endLine: 7,
102+
endColumn: 16
88103
}
89104
]
90105
},
@@ -115,23 +130,38 @@ tester.run('keyword-spacing', rule, {
115130
errors: [
116131
{
117132
message: 'Unexpected space(s) after "if".',
118-
line: 3
133+
line: 3,
134+
column: 13,
135+
endLine: 3,
136+
endColumn: 14
119137
},
120138
{
121139
message: 'Unexpected space(s) before "else".',
122-
line: 5
140+
line: 5,
141+
column: 12,
142+
endLine: 5,
143+
endColumn: 13
123144
},
124145
{
125146
message: 'Unexpected space(s) after "if".',
126-
line: 5
147+
line: 5,
148+
column: 20,
149+
endLine: 5,
150+
endColumn: 21
127151
},
128152
{
129153
message: 'Unexpected space(s) before "else".',
130-
line: 7
154+
line: 7,
155+
column: 12,
156+
endLine: 7,
157+
endColumn: 13
131158
},
132159
{
133160
message: 'Unexpected space(s) after "else".',
134-
line: 7
161+
line: 7,
162+
column: 17,
163+
endLine: 7,
164+
endColumn: 18
135165
}
136166
]
137167
},
@@ -145,7 +175,10 @@ tester.run('keyword-spacing', rule, {
145175
errors: [
146176
{
147177
message: 'Expected space(s) after "return".',
148-
line: 2
178+
line: 2,
179+
column: 56,
180+
endLine: 2,
181+
endColumn: 62
149182
}
150183
]
151184
}

0 commit comments

Comments
 (0)
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