Skip to content

Commit 1314ef2

Browse files
committed
test(dot-notation): make tests more strict
1 parent d46c0a8 commit 1314ef2

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

tests/lib/rules/dot-notation.js

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,28 @@ tester.run('dot-notation', rule, {
2929
{
3030
code: `<template><div :attr="foo['bar']" /></template>`,
3131
output: `<template><div :attr="foo.bar" /></template>`,
32-
errors: ['["bar"] is better written in dot notation.']
32+
errors: [
33+
{
34+
message: '["bar"] is better written in dot notation.',
35+
line: 1,
36+
column: 27,
37+
endLine: 1,
38+
endColumn: 32
39+
}
40+
]
3341
},
3442
{
3543
code: `<template><div :[foo[\`bar\`]]="a" /></template>`,
3644
output: `<template><div :[foo.bar]="a" /></template>`,
37-
errors: ['[`bar`] is better written in dot notation.']
45+
errors: [
46+
{
47+
message: '[`bar`] is better written in dot notation.',
48+
line: 1,
49+
column: 22,
50+
endLine: 1,
51+
endColumn: 27
52+
}
53+
]
3854
},
3955
// CSS vars injection
4056
{
@@ -50,7 +66,15 @@ tester.run('dot-notation', rule, {
5066
color: v-bind(foo.bar)
5167
}
5268
</style>`,
53-
errors: ['[`bar`] is better written in dot notation.']
69+
errors: [
70+
{
71+
message: '[`bar`] is better written in dot notation.',
72+
line: 4,
73+
column: 27,
74+
endLine: 4,
75+
endColumn: 32
76+
}
77+
]
5478
},
5579
{
5680
code: `
@@ -65,7 +89,15 @@ tester.run('dot-notation', rule, {
6589
color: v-bind("foo.bar")
6690
}
6791
</style>`,
68-
errors: ['[`bar`] is better written in dot notation.']
92+
errors: [
93+
{
94+
message: '[`bar`] is better written in dot notation.',
95+
line: 4,
96+
column: 28,
97+
endLine: 4,
98+
endColumn: 33
99+
}
100+
]
69101
}
70102
]
71103
})

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