Skip to content

Commit 37c3da0

Browse files
authored
test(key-spacing): make tests more strict (#2842)
1 parent 1ed167e commit 37c3da0

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

tests/lib/rules/key-spacing.js

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,41 @@ tester.run('key-spacing', rule, {
2424
code: '<template><div :attr="{a :1}" /></template>',
2525
output: '<template><div :attr="{a: 1}" /></template>',
2626
errors: [
27-
"Extra space after key 'a'.",
28-
"Missing space before value for key 'a'."
27+
{
28+
message: "Extra space after key 'a'.",
29+
line: 1,
30+
column: 25,
31+
endLine: 1,
32+
endColumn: 26
33+
},
34+
{
35+
message: "Missing space before value for key 'a'.",
36+
line: 1,
37+
column: 27,
38+
endLine: 1,
39+
endColumn: 28
40+
}
2941
]
3042
},
3143
{
3244
code: '<template><div :[{a:1}[`a`]]="{a:1}[`a`]" /></template>',
3345
output: '<template><div :[{a:1}[`a`]]="{a : 1}[`a`]" /></template>',
3446
options: [{ beforeColon: true }],
3547
errors: [
36-
"Missing space after key 'a'.",
37-
"Missing space before value for key 'a'."
48+
{
49+
message: "Missing space after key 'a'.",
50+
line: 1,
51+
column: 32,
52+
endLine: 1,
53+
endColumn: 33
54+
},
55+
{
56+
message: "Missing space before value for key 'a'.",
57+
line: 1,
58+
column: 34,
59+
endLine: 1,
60+
endColumn: 35
61+
}
3862
]
3963
}
4064
]

0 commit comments

Comments
 (0)