mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 11:54:02 +00:00
test(ActionBarButton): update test cases
This commit is contained in:
10
src/action-bar-button/test/__snapshots__/index.spec.js.snap
Normal file
10
src/action-bar-button/test/__snapshots__/index.spec.js.snap
Normal 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>
|
||||
`;
|
11
src/action-bar-button/test/index.spec.js
Normal file
11
src/action-bar-button/test/index.spec.js
Normal 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();
|
||||
});
|
Reference in New Issue
Block a user