Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fe0ce5a

Browse files
authored
test(dot-notation): make tests more strict (#2825)
1 parent 28e8b2f commit fe0ce5a

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)

AltStyle によって変換されたページ (->オリジナル) /