|
|
@@ -62,6 +62,12 @@ describe(`runtime-dom: style patching`, () => {
|
|
|
expect(el.style.getPropertyValue('margin-right')).toBe('10px')
|
|
|
})
|
|
|
|
|
|
+ it('patch with falsy style value', () => {
|
|
|
+ const el = document.createElement('div')
|
|
|
+ patchProp(el as any, 'style', { width: '100px' }, { width: 0 })
|
|
|
+ expect(el.style.width).toBe('0px')
|
|
|
+ })
|
|
|
+
|
|
|
// JSDOM doesn't support custom properties on style object so we have to
|
|
|
// mock it here.
|
|
|
function mockElementWithStyle() {
|