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 0cbd9b7

Browse files
authored
test(no-deprecated-destroyed-lifecycle): make tests more strict (#2869)
1 parent 9be7549 commit 0cbd9b7

File tree

1 file changed

+40
-10
lines changed

1 file changed

+40
-10
lines changed

‎tests/lib/rules/no-deprecated-destroyed-lifecycle.js

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,18 @@ ruleTester.run('no-deprecated-destroyed-lifecycle', rule, {
118118
{
119119
message:
120120
'The `beforeDestroy` lifecycle hook is deprecated. Use `beforeUnmount` instead.',
121-
line: 4
121+
line: 4,
122+
column: 9,
123+
endLine: 4,
124+
endColumn: 22
122125
},
123126
{
124127
message:
125128
'The `destroyed` lifecycle hook is deprecated. Use `unmounted` instead.',
126-
line: 5
129+
line: 5,
130+
column: 9,
131+
endLine: 5,
132+
endColumn: 18
127133
}
128134
]
129135
},
@@ -149,12 +155,18 @@ ruleTester.run('no-deprecated-destroyed-lifecycle', rule, {
149155
{
150156
message:
151157
'The `beforeDestroy` lifecycle hook is deprecated. Use `beforeUnmount` instead.',
152-
line: 4
158+
line: 4,
159+
column: 9,
160+
endLine: 4,
161+
endColumn: 22
153162
},
154163
{
155164
message:
156165
'The `destroyed` lifecycle hook is deprecated. Use `unmounted` instead.',
157-
line: 5
166+
line: 5,
167+
column: 9,
168+
endLine: 5,
169+
endColumn: 18
158170
}
159171
]
160172
},
@@ -198,12 +210,18 @@ ruleTester.run('no-deprecated-destroyed-lifecycle', rule, {
198210
{
199211
message:
200212
'The `beforeDestroy` lifecycle hook is deprecated. Use `beforeUnmount` instead.',
201-
line: 12
213+
line: 12,
214+
column: 9,
215+
endLine: 12,
216+
endColumn: 22
202217
},
203218
{
204219
message:
205220
'The `destroyed` lifecycle hook is deprecated. Use `unmounted` instead.',
206-
line: 13
221+
line: 13,
222+
column: 9,
223+
endLine: 13,
224+
endColumn: 18
207225
}
208226
]
209227
},
@@ -229,12 +247,18 @@ ruleTester.run('no-deprecated-destroyed-lifecycle', rule, {
229247
{
230248
message:
231249
'The `beforeDestroy` lifecycle hook is deprecated. Use `beforeUnmount` instead.',
232-
line: 4
250+
line: 4,
251+
column: 10,
252+
endLine: 4,
253+
endColumn: 25
233254
},
234255
{
235256
message:
236257
'The `destroyed` lifecycle hook is deprecated. Use `unmounted` instead.',
237-
line: 5
258+
line: 5,
259+
column: 10,
260+
endLine: 5,
261+
endColumn: 21
238262
}
239263
]
240264
},
@@ -260,12 +284,18 @@ ruleTester.run('no-deprecated-destroyed-lifecycle', rule, {
260284
{
261285
message:
262286
'The `beforeDestroy` lifecycle hook is deprecated. Use `beforeUnmount` instead.',
263-
line: 4
287+
line: 4,
288+
column: 10,
289+
endLine: 4,
290+
endColumn: 25
264291
},
265292
{
266293
message:
267294
'The `destroyed` lifecycle hook is deprecated. Use `unmounted` instead.',
268-
line: 5
295+
line: 5,
296+
column: 10,
297+
endLine: 5,
298+
endColumn: 21
269299
}
270300
]
271301
}

0 commit comments

Comments
(0)

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