[improvement] Cell: functional (#2729)
This commit is contained in:
@@ -2,8 +2,15 @@ import Cell from '..';
|
||||
import { mount } from '../../../test/utils';
|
||||
|
||||
test('click event', () => {
|
||||
const wrapper = mount(Cell);
|
||||
const click = jest.fn();
|
||||
const wrapper = mount(Cell, {
|
||||
context: {
|
||||
on: {
|
||||
click
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
wrapper.trigger('click');
|
||||
expect(wrapper.emitted('click')).toBeTruthy();
|
||||
expect(click.mock.calls.length).toBeTruthy();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user