import { UBaseButton } from './UBaseButton' import { describe, it, expect } from 'vitest' import { mount } from '@vue/test-utils' describe('UBaseButton', () => { it('should render correctly', () => { const wrapper = mount(UBaseButton, { props: { type: 'primary', }, slots: { default: 'Button', }, }) expect(wrapper.html()).toMatchSnapshot() }) it('should emit click event when clicked', async () => { const wrapper = mount(UBaseButton, { slots: { default: 'Button', }, }) await wrapper.trigger('click') expect(wrapper.emitted()).toHaveProperty('click') }) })