Skip to content

Commit 102f560

Browse files
committed
test(compat): update ATTR_ENUMERATED_COERCION test to include spellcheck attribute
1 parent a56b4ab commit 102f560

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

packages/vue-compat/__tests__/misc.spec.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,16 +276,23 @@ test('ATTR_ENUMERATED_COERCION', () => {
276276
).toHaveBeenWarned()
277277
})
278278

279-
test('ATTR_ENUMERATED_COERCION: true', () => {
279+
test('ATTR_ENUMERATED_COERCION, coercing "false"', () => {
280280
const vm = new Vue({
281-
compatConfig: { ATTR_ENUMERATED_COERCION: true },
282-
template: `<div><div draggable="false">hello</div></div>`,
281+
template: `<div><div draggable="false" :spellcheck="false">hello</div></div>`,
283282
}).$mount()
284-
expect(vm.$el.innerHTML).toBe(`<div draggable="false">hello</div>`)
283+
expect(vm.$el.innerHTML).toBe(
284+
`<div draggable="false" spellcheck="false">hello</div>`,
285+
)
285286
expect(
286287
(
287288
deprecationData[DeprecationTypes.ATTR_ENUMERATED_COERCION]
288289
.message as Function
289290
)('draggable', 'false', 'false'),
290291
).toHaveBeenWarned()
292+
expect(
293+
(
294+
deprecationData[DeprecationTypes.ATTR_ENUMERATED_COERCION]
295+
.message as Function
296+
)('spellcheck', 'false', 'false'),
297+
).toHaveBeenWarned()
291298
})

0 commit comments

Comments
 (0)