Skip to content

Commit afe22e0

Browse files
authored
test(enforce-style-attribute): make tests more strict (#2827)
1 parent fe0ce5a commit afe22e0

File tree

1 file changed

+45
-9
lines changed

1 file changed

+45
-9
lines changed

tests/lib/rules/enforce-style-attribute.js

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,23 @@ tester.run('enforce-style-attribute', rule, {
6363
code: `<template></template><script></script><style></style>`,
6464
errors: [
6565
{
66-
message: 'Plain <style> tags are not allowed. Allowed: scoped.'
66+
message: 'Plain <style> tags are not allowed. Allowed: scoped.',
67+
line: 1,
68+
column: 39,
69+
endLine: 1,
70+
endColumn: 54
6771
}
6872
]
6973
},
7074
{
7175
code: `<template></template><script></script><style module></style>`,
7276
errors: [
7377
{
74-
message: 'The module attribute is not allowed. Allowed: scoped.'
78+
message: 'The module attribute is not allowed. Allowed: scoped.',
79+
line: 1,
80+
column: 39,
81+
endLine: 1,
82+
endColumn: 61
7583
}
7684
]
7785
},
@@ -81,7 +89,11 @@ tester.run('enforce-style-attribute', rule, {
8189
options: [{ allow: ['scoped'] }],
8290
errors: [
8391
{
84-
message: 'Plain <style> tags are not allowed. Allowed: scoped.'
92+
message: 'Plain <style> tags are not allowed. Allowed: scoped.',
93+
line: 1,
94+
column: 39,
95+
endLine: 1,
96+
endColumn: 54
8597
}
8698
]
8799
},
@@ -90,7 +102,11 @@ tester.run('enforce-style-attribute', rule, {
90102
options: [{ allow: ['scoped'] }],
91103
errors: [
92104
{
93-
message: 'The module attribute is not allowed. Allowed: scoped.'
105+
message: 'The module attribute is not allowed. Allowed: scoped.',
106+
line: 1,
107+
column: 39,
108+
endLine: 1,
109+
endColumn: 61
94110
}
95111
]
96112
},
@@ -100,7 +116,11 @@ tester.run('enforce-style-attribute', rule, {
100116
options: [{ allow: ['module'] }],
101117
errors: [
102118
{
103-
message: 'Plain <style> tags are not allowed. Allowed: module.'
119+
message: 'Plain <style> tags are not allowed. Allowed: module.',
120+
line: 1,
121+
column: 39,
122+
endLine: 1,
123+
endColumn: 54
104124
}
105125
]
106126
},
@@ -109,7 +129,11 @@ tester.run('enforce-style-attribute', rule, {
109129
options: [{ allow: ['module'] }],
110130
errors: [
111131
{
112-
message: 'The scoped attribute is not allowed. Allowed: module.'
132+
message: 'The scoped attribute is not allowed. Allowed: module.',
133+
line: 1,
134+
column: 39,
135+
endLine: 1,
136+
endColumn: 61
113137
}
114138
]
115139
},
@@ -120,7 +144,11 @@ tester.run('enforce-style-attribute', rule, {
120144
errors: [
121145
{
122146
message:
123-
'Plain <style> tags are not allowed. Allowed: module, scoped.'
147+
'Plain <style> tags are not allowed. Allowed: module, scoped.',
148+
line: 1,
149+
column: 39,
150+
endLine: 1,
151+
endColumn: 54
124152
}
125153
]
126154
},
@@ -130,7 +158,11 @@ tester.run('enforce-style-attribute', rule, {
130158
errors: [
131159
{
132160
message:
133-
'The module attribute is not allowed. Allowed: plain, scoped.'
161+
'The module attribute is not allowed. Allowed: plain, scoped.',
162+
line: 1,
163+
column: 39,
164+
endLine: 1,
165+
endColumn: 61
134166
}
135167
]
136168
},
@@ -140,7 +172,11 @@ tester.run('enforce-style-attribute', rule, {
140172
errors: [
141173
{
142174
message:
143-
'The scoped attribute is not allowed. Allowed: module, plain.'
175+
'The scoped attribute is not allowed. Allowed: module, plain.',
176+
line: 1,
177+
column: 39,
178+
endLine: 1,
179+
endColumn: 61
144180
}
145181
]
146182
}

0 commit comments

Comments
 (0)