test(ActionBarButton): update test cases

This commit is contained in:
chenjiahan
2020-11-08 20:19:08 +08:00
parent 0bd440c53e
commit 9c841da26d
3 changed files with 21 additions and 17 deletions

View File

@@ -0,0 +1,10 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render default slot and match snapshot 1`] = `
<button type="button" class="van-button van-button--default van-button--large van-action-bar-button">
<div class="van-button__content">
<!----><span class="van-button__text">Content</span>
<!---->
</div>
</button>
`;

View File

@@ -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();
});