mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
test(Button): add basic test case
This commit is contained in:
parent
5b6e827080
commit
1022969ae4
13
src/button/test/__snapshots__/index.spec.js.snap
Normal file
13
src/button/test/__snapshots__/index.spec.js.snap
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`loading-size prop 1`] = `
|
||||||
|
<button type="button" class="van-button van-button--default van-button--normal van-button--loading">
|
||||||
|
<div class="van-button__content">
|
||||||
|
<div class="van-loading van-loading--circular van-button__loading"><span class="van-loading__spinner van-loading__spinner--circular" style="color: currentColor; width: 10px; height: 10px;"><svg class="van-loading__circular" viewBox="25 25 50 50"><circle cx="50" cy="50" r="20" fill="none"></circle></svg></span>
|
||||||
|
<!---->
|
||||||
|
</div>
|
||||||
|
<!---->
|
||||||
|
<!---->
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
`;
|
12
src/button/test/index.spec.js
Normal file
12
src/button/test/index.spec.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import { mount } from '../../../test';
|
||||||
|
import Button from '..';
|
||||||
|
|
||||||
|
test('loading-size prop', () => {
|
||||||
|
const wrapper = mount(Button, {
|
||||||
|
propsData: {
|
||||||
|
loading: true,
|
||||||
|
loadingSize: '10px',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
expect(wrapper.html()).toMatchSnapshot();
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user