Skip to content

Commit 3b147c8

Browse files
committed
test: add test
1 parent f8f5d23 commit 3b147c8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/runtime-dom/__tests__/patchProps.spec.ts

+9
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,15 @@ describe('runtime-dom: props patching', () => {
152152
expect(root.innerHTML).toBe(`<div><del>baz</del></div>`)
153153
})
154154

155+
test('patch innerHTML porp w/ undefined value', async () => {
156+
const root = document.createElement('div')
157+
const Comp = {
158+
render: () => h('div', { innerHTML: undefined }),
159+
}
160+
render(h(Comp), root)
161+
expect(root.innerHTML).toBe(`<div></div>`)
162+
})
163+
155164
test('textContent unmount prev children', () => {
156165
const fn = vi.fn()
157166
const comp = {

0 commit comments

Comments
 (0)