Skip to content

Commit

Permalink
test: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
jh-leong committed Jul 19, 2024
1 parent f8f5d23 commit 3b147c8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/runtime-dom/__tests__/patchProps.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,15 @@ describe('runtime-dom: props patching', () => {
expect(root.innerHTML).toBe(`<div><del>baz</del></div>`)
})

test('patch innerHTML porp w/ undefined value', async () => {
const root = document.createElement('div')
const Comp = {
render: () => h('div', { innerHTML: undefined }),
}
render(h(Comp), root)
expect(root.innerHTML).toBe(`<div></div>`)
})

test('textContent unmount prev children', () => {
const fn = vi.fn()
const comp = {
Expand Down

0 comments on commit 3b147c8

Please sign in to comment.