fix(runtime-dom): patch translate as an attr (#5485)

close #5462
This commit is contained in:
木杉
2022-04-13 17:16:33 +08:00
committed by GitHub
parent 154233abdb
commit 2c09969b13
2 changed files with 12 additions and 5 deletions

View File

@@ -263,4 +263,11 @@ describe('runtime-dom: props patching', () => {
)
expect(el.value).toBe('baz')
})
test('translate attribute', () => {
const el = document.createElement('div')
patchProp(el, 'translate', null, 'no')
expect(el.translate).toBeFalsy()
expect(el.getAttribute('translate')).toBe('no')
})
})