test(ActionBarButton): update test cases
This commit is contained in:
@@ -1,30 +1,13 @@
|
||||
import ActionBar from '..';
|
||||
import Button from '../../action-bar-button';
|
||||
import Icon from '../../action-bar-icon';
|
||||
import { mount } from '../../../test';
|
||||
|
||||
test('Button click event', () => {
|
||||
const wrapper = mount(Button);
|
||||
wrapper.trigger('click');
|
||||
expect(wrapper.emitted('click').length).toEqual(1);
|
||||
});
|
||||
|
||||
test('Icon click event', () => {
|
||||
const wrapper = mount(Icon);
|
||||
wrapper.trigger('click');
|
||||
expect(wrapper.emitted('click').length).toEqual(1);
|
||||
});
|
||||
|
||||
test('Button render default slot', () => {
|
||||
const wrapper = mount({
|
||||
render(h) {
|
||||
return h(Button, null, ['Default Content']);
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('Icon render default slot', () => {
|
||||
const wrapper = mount({
|
||||
render(h) {
|
||||
|
||||
Reference in New Issue
Block a user