Skip to content

Commit 52f42d3

Browse files
authored
test(comma-style): make tests more strict (#2813)
1 parent 62d70c6 commit 52f42d3

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

tests/lib/rules/comma-style.js

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ tester.run('comma-style', rule, {
7070
errors: [
7171
{
7272
message: "',' should be placed last.",
73-
line: 5
73+
line: 5,
74+
column: 13,
75+
endLine: 5,
76+
endColumn: 14
7477
}
7578
]
7679
},
@@ -89,7 +92,10 @@ tester.run('comma-style', rule, {
8992
errors: [
9093
{
9194
message: "',' should be placed last.",
92-
line: 4
95+
line: 4,
96+
column: 13,
97+
endLine: 4,
98+
endColumn: 14
9399
}
94100
]
95101
},
@@ -107,8 +113,11 @@ tester.run('comma-style', rule, {
107113
options: ['first', { exceptions: { ArrowFunctionExpression: false } }],
108114
errors: [
109115
{
110-
message: "',' should be placed first."
111-
// line: 3 // eslint v7.0
116+
message: "',' should be placed first.",
117+
line: 3,
118+
column: 40,
119+
endLine: 3,
120+
endColumn: 41
112121
}
113122
]
114123
},
@@ -130,8 +139,11 @@ tester.run('comma-style', rule, {
130139
options: ['first', { exceptions: { FunctionExpression: false } }],
131140
errors: [
132141
{
133-
message: "',' should be placed first."
134-
// line: 3 // eslint v7.0
142+
message: "',' should be placed first.",
143+
line: 3,
144+
column: 36,
145+
endLine: 3,
146+
endColumn: 37
135147
}
136148
]
137149
},
@@ -151,8 +163,11 @@ tester.run('comma-style', rule, {
151163
options: ['last', { exceptions: { FunctionExpression: false } }],
152164
errors: [
153165
{
154-
message: "',' should be placed last."
155-
// line: 3 // eslint v7.0
166+
message: "',' should be placed last.",
167+
line: 5,
168+
column: 13,
169+
endLine: 5,
170+
endColumn: 14
156171
}
157172
]
158173
}

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