mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
feat: perfect tag test case
This commit is contained in:
committed by
Herrington Darkholme
parent
4ee1c8b078
commit
ef8ae2efe0
@@ -40,7 +40,7 @@ describe('Tag.vue', () => {
|
||||
expect(vm.$el.classList.contains('is-hit')).toEqual(true);
|
||||
})
|
||||
|
||||
test('closeable', () => {
|
||||
test('closeable', async () => {
|
||||
const instance = mount(Tag, {
|
||||
props: {
|
||||
closable: true,
|
||||
@@ -48,6 +48,9 @@ describe('Tag.vue', () => {
|
||||
})
|
||||
const closeBtn = instance.find('.el-tag .el-tag__close');
|
||||
expect(closeBtn.exists()).toBe(true);
|
||||
|
||||
await closeBtn.trigger('click');
|
||||
expect(instance.emitted().close).toBeTruthy();
|
||||
})
|
||||
|
||||
test('closeTransition', () => {
|
||||
|
||||
Reference in New Issue
Block a user