test: update test case

This commit is contained in:
daiwei 2024-10-08 21:23:46 +08:00
parent b44f0c715b
commit 3b7fd3049f
1 changed files with 1 additions and 2 deletions

View File

@ -1387,7 +1387,7 @@ describe('defineCustomElement', () => {
expect(e.shadowRoot!.innerHTML).toBe(`false,boolean`) expect(e.shadowRoot!.innerHTML).toBe(`false,boolean`)
}) })
test('avoid overriding tagName', async () => { test('prop name is the same as native attribute', async () => {
const E = defineCustomElement({ const E = defineCustomElement({
props: { props: {
tagName: { tagName: {
@ -1402,6 +1402,5 @@ describe('defineCustomElement', () => {
container.innerHTML = '<el-attr-tag-name tag-name="foo">' container.innerHTML = '<el-attr-tag-name tag-name="foo">'
const e = container.childNodes[0] as VueElement const e = container.childNodes[0] as VueElement
expect(e.shadowRoot!.innerHTML).toBe(`foo`) expect(e.shadowRoot!.innerHTML).toBe(`foo`)
expect(e.tagName).toBe(`EL-ATTR-TAG-NAME`)
}) })
}) })