Skip to content

Commit 326963b

Browse files
authored
test(comma-dangle): make tests more strict (#2811)
1 parent 26432d7 commit 326963b

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

tests/lib/rules/comma-dangle.js

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ tester.run('comma-dangle', rule, {
6363
errors: [
6464
{
6565
message: 'Unexpected trailing comma.',
66-
line: 3
66+
line: 3,
67+
column: 41,
68+
endLine: 3,
69+
endColumn: 42
6770
}
6871
]
6972
},
@@ -84,7 +87,10 @@ tester.run('comma-dangle', rule, {
8487
errors: [
8588
{
8689
message: 'Unexpected trailing comma.',
87-
line: 3
90+
line: 3,
91+
column: 40,
92+
endLine: 3,
93+
endColumn: 41
8894
}
8995
]
9096
},
@@ -113,11 +119,17 @@ tester.run('comma-dangle', rule, {
113119
errors: [
114120
{
115121
message: 'Unexpected trailing comma.',
116-
line: 4
122+
line: 4,
123+
column: 21,
124+
endLine: 4,
125+
endColumn: 22
117126
},
118127
{
119128
message: 'Missing trailing comma.',
120-
line: 7
129+
line: 7,
130+
column: 16,
131+
endLine: 8,
132+
endColumn: 1
121133
}
122134
]
123135
},
@@ -132,7 +144,11 @@ tester.run('comma-dangle', rule, {
132144
</template>`,
133145
errors: [
134146
{
135-
message: 'Unexpected trailing comma.'
147+
message: 'Unexpected trailing comma.',
148+
line: 3,
149+
column: 23,
150+
endLine: 3,
151+
endColumn: 24
136152
}
137153
]
138154
},
@@ -148,7 +164,11 @@ tester.run('comma-dangle', rule, {
148164
options: ['always'],
149165
errors: [
150166
{
151-
message: 'Missing trailing comma.'
167+
message: 'Missing trailing comma.',
168+
line: 3,
169+
column: 23,
170+
endLine: 3,
171+
endColumn: 24
152172
}
153173
]
154174
}

0 commit comments

Comments
 (0)