mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
test(CellGroup): update test cases
This commit is contained in:
parent
0f9a5a8764
commit
d212883c5e
8
src/cell-group/test/__snapshots__/index.spec.js.snap
Normal file
8
src/cell-group/test/__snapshots__/index.spec.js.snap
Normal 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>
|
||||
`;
|
12
src/cell-group/test/index.spec.js
Normal file
12
src/cell-group/test/index.spec.js
Normal 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();
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user