mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
* test(components): [message] add one test case for #20333 * fix: error caused by other test cases After running the test case "it should render vnode function", there is a message in the body
This commit is contained in:
@@ -196,4 +196,15 @@ describe('Message on command', () => {
|
||||
ElMessage._context = null
|
||||
})
|
||||
})
|
||||
|
||||
// #20333
|
||||
test('it should destroy self immediately', async () => {
|
||||
const el = document.createElement('div')
|
||||
document.body.appendChild(el)
|
||||
const { close } = Message({ appendTo: el })
|
||||
close()
|
||||
|
||||
await rAF()
|
||||
expect(el.querySelector(selector)).toBeFalsy()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user