[new feature] SwitchCell: add border prop

This commit is contained in:
陈嘉涵
2019-04-30 15:11:05 +08:00
parent 3af9cf6c41
commit 95925ab328
8 changed files with 36 additions and 6 deletions
@@ -0,0 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`border prop 1`] = `
<div class="van-cell van-cell--center van-cell--borderless van-switch-cell">
<div class="van-cell__value van-cell__value--alone">
<div class="van-switch" style="font-size: 24px;">
<div class="van-switch__node"></div>
</div>
</div>
</div>
`;
+10
View File
@@ -15,3 +15,13 @@ test('change event', () => {
expect(onChange).toHaveBeenCalledWith(true);
});
test('border prop', () => {
const wrapper = mount(SwitchCell, {
propsData: {
border: false
}
});
expect(wrapper).toMatchSnapshot();
});