[new feature] Tag: add click event (#2693)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import Tag from '..';
|
||||
import { mount } from '../../../test/utils';
|
||||
|
||||
test('click event', () => {
|
||||
const click = jest.fn();
|
||||
const wrapper = mount(Tag, {
|
||||
context: {
|
||||
on: {
|
||||
click
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
wrapper.trigger('click');
|
||||
expect(click.mock.calls.length).toEqual(1);
|
||||
});
|
||||
Reference in New Issue
Block a user