diff --git a/src/action-bar-button/test/__snapshots__/index.spec.js.snap b/src/action-bar-button/test/__snapshots__/index.spec.js.snap new file mode 100644 index 000000000..81f731eb4 --- /dev/null +++ b/src/action-bar-button/test/__snapshots__/index.spec.js.snap @@ -0,0 +1,10 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`should render default slot and match snapshot 1`] = ` + +`; diff --git a/src/action-bar-button/test/index.spec.js b/src/action-bar-button/test/index.spec.js new file mode 100644 index 000000000..8024927c8 --- /dev/null +++ b/src/action-bar-button/test/index.spec.js @@ -0,0 +1,11 @@ +import { mount } from '@vue/test-utils'; +import ActionBarButton from '..'; + +test('should render default slot and match snapshot', () => { + const wrapper = mount(ActionBarButton, { + slots: { + default: 'Content', + }, + }); + expect(wrapper.html()).toMatchSnapshot(); +}); diff --git a/src/action-bar/test/index.legacy.js b/src/action-bar/test/index.legacy.js index 7964b004f..b484f1b44 100644 --- a/src/action-bar/test/index.legacy.js +++ b/src/action-bar/test/index.legacy.js @@ -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) {