Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f75a003

Browse files
authored
test(attribute-hyphenation): make tests more strict (#2802)
1 parent 468789b commit f75a003

File tree

1 file changed

+110
-28
lines changed

1 file changed

+110
-28
lines changed

tests/lib/rules/attribute-hyphenation.js

Lines changed: 110 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ ruleTester.run('attribute-hyphenation', rule, {
118118
{
119119
message: "Attribute 'my-prop' can't be hyphenated.",
120120
type: 'VIdentifier',
121-
line: 1
121+
line: 1,
122+
column: 24,
123+
endLine: 1,
124+
endColumn: 37
122125
}
123126
]
124127
},
@@ -131,7 +134,10 @@ ruleTester.run('attribute-hyphenation', rule, {
131134
{
132135
message: "Attribute 'MyProp' must be hyphenated.",
133136
type: 'VIdentifier',
134-
line: 1
137+
line: 1,
138+
column: 24,
139+
endLine: 1,
140+
endColumn: 36
135141
}
136142
]
137143
},
@@ -145,7 +151,10 @@ ruleTester.run('attribute-hyphenation', rule, {
145151
{
146152
message: "Attribute ':my-prop' can't be hyphenated.",
147153
type: 'VDirectiveKey',
148-
line: 1
154+
line: 1,
155+
column: 24,
156+
endLine: 1,
157+
endColumn: 39
149158
}
150159
]
151160
},
@@ -158,7 +167,10 @@ ruleTester.run('attribute-hyphenation', rule, {
158167
{
159168
message: "Attribute ':MyProp' must be hyphenated.",
160169
type: 'VDirectiveKey',
161-
line: 1
170+
line: 1,
171+
column: 24,
172+
endLine: 1,
173+
endColumn: 38
162174
}
163175
]
164176
},
@@ -172,7 +184,10 @@ ruleTester.run('attribute-hyphenation', rule, {
172184
{
173185
message: "Attribute 'v-bind:my-prop' can't be hyphenated.",
174186
type: 'VDirectiveKey',
175-
line: 1
187+
line: 1,
188+
column: 24,
189+
endLine: 1,
190+
endColumn: 45
176191
}
177192
]
178193
},
@@ -185,7 +200,10 @@ ruleTester.run('attribute-hyphenation', rule, {
185200
{
186201
message: "Attribute 'v-bind:MyProp' must be hyphenated.",
187202
type: 'VDirectiveKey',
188-
line: 1
203+
line: 1,
204+
column: 24,
205+
endLine: 1,
206+
endColumn: 44
189207
}
190208
]
191209
},
@@ -198,7 +216,10 @@ ruleTester.run('attribute-hyphenation', rule, {
198216
{
199217
message: "Attribute 'v-bind:MyProp' must be hyphenated.",
200218
type: 'VDirectiveKey',
201-
line: 1
219+
line: 1,
220+
column: 24,
221+
endLine: 1,
222+
endColumn: 44
202223
}
203224
]
204225
},
@@ -212,7 +233,10 @@ ruleTester.run('attribute-hyphenation', rule, {
212233
{
213234
message: "Attribute ':second-prop' can't be hyphenated.",
214235
type: 'VDirectiveKey',
215-
line: 1
236+
line: 1,
237+
column: 46,
238+
endLine: 1,
239+
endColumn: 65
216240
}
217241
]
218242
},
@@ -226,7 +250,10 @@ ruleTester.run('attribute-hyphenation', rule, {
226250
{
227251
message: "Attribute 'v-bind:myProp' must be hyphenated.",
228252
type: 'VDirectiveKey',
229-
line: 1
253+
line: 1,
254+
column: 24,
255+
endLine: 1,
256+
endColumn: 44
230257
}
231258
]
232259
},
@@ -240,7 +267,10 @@ ruleTester.run('attribute-hyphenation', rule, {
240267
{
241268
message: "Attribute 'v-bind:propID' must be hyphenated.",
242269
type: 'VDirectiveKey',
243-
line: 1
270+
line: 1,
271+
column: 24,
272+
endLine: 1,
273+
endColumn: 44
244274
}
245275
]
246276
},
@@ -255,7 +285,10 @@ ruleTester.run('attribute-hyphenation', rule, {
255285
{
256286
message: "Attribute 'v-model:my-prop' can't be hyphenated.",
257287
type: 'VDirectiveKey',
258-
line: 1
288+
line: 1,
289+
column: 24,
290+
endLine: 1,
291+
endColumn: 46
259292
}
260293
]
261294
},
@@ -269,7 +302,10 @@ ruleTester.run('attribute-hyphenation', rule, {
269302
{
270303
message: "Attribute 'v-model:myProp' must be hyphenated.",
271304
type: 'VDirectiveKey',
272-
line: 1
305+
line: 1,
306+
column: 24,
307+
endLine: 1,
308+
endColumn: 45
273309
}
274310
]
275311
},
@@ -282,7 +318,10 @@ ruleTester.run('attribute-hyphenation', rule, {
282318
{
283319
message: "Attribute 'v-model:MyProp' must be hyphenated.",
284320
type: 'VDirectiveKey',
285-
line: 1
321+
line: 1,
322+
column: 24,
323+
endLine: 1,
324+
endColumn: 45
286325
}
287326
]
288327
},
@@ -307,7 +346,10 @@ ruleTester.run('attribute-hyphenation', rule, {
307346
{
308347
message: "Attribute 'third-custom' can't be hyphenated.",
309348
type: 'VIdentifier',
310-
line: 3
349+
line: 3,
350+
column: 111,
351+
endLine: 3,
352+
endColumn: 129
311353
}
312354
]
313355
},
@@ -332,12 +374,18 @@ ruleTester.run('attribute-hyphenation', rule, {
332374
{
333375
message: "Attribute 'custom-hyphen' can't be hyphenated.",
334376
type: 'VIdentifier',
335-
line: 3
377+
line: 3,
378+
column: 71,
379+
endLine: 3,
380+
endColumn: 90
336381
},
337382
{
338383
message: "Attribute 'second-custom' can't be hyphenated.",
339384
type: 'VIdentifier',
340-
line: 3
385+
line: 3,
386+
column: 91,
387+
endLine: 3,
388+
endColumn: 110
341389
}
342390
]
343391
},
@@ -350,7 +398,10 @@ ruleTester.run('attribute-hyphenation', rule, {
350398
{
351399
message: "Attribute 'my-prop' can't be hyphenated.",
352400
type: 'VIdentifier',
353-
line: 1
401+
line: 1,
402+
column: 22,
403+
endLine: 1,
404+
endColumn: 35
354405
}
355406
]
356407
},
@@ -363,7 +414,10 @@ ruleTester.run('attribute-hyphenation', rule, {
363414
{
364415
message: "Attribute 'MyProp' must be hyphenated.",
365416
type: 'VIdentifier',
366-
line: 1
417+
line: 1,
418+
column: 22,
419+
endLine: 1,
420+
endColumn: 34
367421
}
368422
]
369423
},
@@ -376,7 +430,10 @@ ruleTester.run('attribute-hyphenation', rule, {
376430
{
377431
message: "Attribute ':attr_Gg' must be hyphenated.",
378432
type: 'VDirectiveKey',
379-
line: 1
433+
line: 1,
434+
column: 24,
435+
endLine: 1,
436+
endColumn: 39
380437
}
381438
]
382439
},
@@ -389,7 +446,10 @@ ruleTester.run('attribute-hyphenation', rule, {
389446
{
390447
message: "Attribute ':Attr_Hh' must be hyphenated.",
391448
type: 'VDirectiveKey',
392-
line: 1
449+
line: 1,
450+
column: 24,
451+
endLine: 1,
452+
endColumn: 39
393453
}
394454
]
395455
},
@@ -402,7 +462,10 @@ ruleTester.run('attribute-hyphenation', rule, {
402462
{
403463
message: "Attribute ':_attr_Jj' must be hyphenated.",
404464
type: 'VDirectiveKey',
405-
line: 1
465+
line: 1,
466+
column: 24,
467+
endLine: 1,
468+
endColumn: 40
406469
}
407470
]
408471
},
@@ -415,7 +478,10 @@ ruleTester.run('attribute-hyphenation', rule, {
415478
{
416479
message: "Attribute ':_attrKk' must be hyphenated.",
417480
type: 'VDirectiveKey',
418-
line: 1
481+
line: 1,
482+
column: 24,
483+
endLine: 1,
484+
endColumn: 39
419485
}
420486
]
421487
},
@@ -428,7 +494,10 @@ ruleTester.run('attribute-hyphenation', rule, {
428494
{
429495
message: "Attribute ':_AttrLl' must be hyphenated.",
430496
type: 'VDirectiveKey',
431-
line: 1
497+
line: 1,
498+
column: 24,
499+
endLine: 1,
500+
endColumn: 39
432501
}
433502
]
434503
},
@@ -441,7 +510,10 @@ ruleTester.run('attribute-hyphenation', rule, {
441510
{
442511
message: "Attribute ':my-custom_prop' can't be hyphenated.",
443512
type: 'VDirectiveKey',
444-
line: 1
513+
line: 1,
514+
column: 24,
515+
endLine: 1,
516+
endColumn: 46
445517
}
446518
]
447519
},
@@ -454,7 +526,10 @@ ruleTester.run('attribute-hyphenation', rule, {
454526
{
455527
message: "Attribute ':myAge.sync' must be hyphenated.",
456528
type: 'VDirectiveKey',
457-
line: 1
529+
line: 1,
530+
column: 24,
531+
endLine: 1,
532+
endColumn: 42
458533
}
459534
]
460535
},
@@ -467,7 +542,10 @@ ruleTester.run('attribute-hyphenation', rule, {
467542
{
468543
message: "Attribute ':my-age.sync' can't be hyphenated.",
469544
type: 'VDirectiveKey',
470-
line: 1
545+
line: 1,
546+
column: 24,
547+
endLine: 1,
548+
endColumn: 43
471549
}
472550
]
473551
},
@@ -490,7 +568,9 @@ ruleTester.run('attribute-hyphenation', rule, {
490568
message: "Attribute 'my-prop' can't be hyphenated.",
491569
type: 'VIdentifier',
492570
line: 3,
493-
column: 17
571+
column: 17,
572+
endLine: 3,
573+
endColumn: 24
494574
}
495575
]
496576
},
@@ -513,7 +593,9 @@ ruleTester.run('attribute-hyphenation', rule, {
513593
message: "Attribute 'myProp' must be hyphenated.",
514594
type: 'VIdentifier',
515595
line: 3,
516-
column: 17
596+
column: 17,
597+
endLine: 3,
598+
endColumn: 23
517599
}
518600
]
519601
}

0 commit comments

Comments
 (0)