diff --git a/test/VButton.spec.ts b/test/VButton.spec.ts index d0cc48f..c0c1974 100644 --- a/test/VButton.spec.ts +++ b/test/VButton.spec.ts @@ -93,6 +93,21 @@ describe('VButton', () => { expect(onClick).not.toHaveBeenCalled() }) + test('Clicked button', async () => { + const onClick = vi.fn() + const wrapper = mount(VButton, { + props: { + title: 'button', + label: 'label', + onClick, + } + }) + const button = wrapper.find('button') + await button.trigger('click') + // check that the onClck function has been called + expect(onClick).toHaveBeenCalled() + }) + test('small button', () => { const wrapper = mount(VButton, { props: {