mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-23 02:59:21 +01:00
Add event listeners to vue component, fix #400
This commit is contained in:
@@ -41,4 +41,16 @@ describe('Using lucide icon components', () => {
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
expect(wrapper.attributes('style')).toContain('position: absolute')
|
||||
});
|
||||
|
||||
it('should call the onClick event', () => {
|
||||
const onClick = jest.fn()
|
||||
const wrapper = mount(Smile, {
|
||||
listeners: {
|
||||
click: onClick
|
||||
}
|
||||
})
|
||||
|
||||
wrapper.trigger('click')
|
||||
expect(onClick).toHaveBeenCalled()
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user