test(CellGroup): update test cases

This commit is contained in:
chenjiahan 2020-11-13 23:43:27 +08:00
parent 0f9a5a8764
commit d212883c5e
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render title slot and match snapshot 1`] = `
<div class="van-cell-group__title">Custom Title</div>
<div class="van-cell-group van-hairline--top-bottom">
<!---->
</div>
`;

View File

@ -0,0 +1,12 @@
import CellGroup from '..';
import { mount } from '@vue/test-utils';
test('should render title slot and match snapshot', () => {
const wrapper = mount(CellGroup, {
slots: {
title: () => 'Custom Title',
},
});
expect(wrapper.html()).toMatchSnapshot();
});