mirror of
https://github.com/youzan/vant.git
synced 2026-04-06 02:00:43 +08:00
feat(List): add finished slot
This commit is contained in:
8
src/list/test/__snapshots__/index.spec.js.snap
Normal file
8
src/list/test/__snapshots__/index.spec.js.snap
Normal file
@@ -0,0 +1,8 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`finished slot 1`] = `
|
||||
<div role="feed" class="van-list">
|
||||
<div class="van-list__finished-text">Custom Finished</div>
|
||||
<div class="van-list__placeholder"></div>
|
||||
</div>
|
||||
`;
|
||||
@@ -70,6 +70,19 @@ test('finished', async () => {
|
||||
expect(wrapper.contains('.van-list__finished-text')).toBeFalsy();
|
||||
});
|
||||
|
||||
test('finished slot', async () => {
|
||||
const wrapper = mount(List, {
|
||||
propsData: {
|
||||
finished: true
|
||||
},
|
||||
scopedSlots: {
|
||||
finished: () => 'Custom Finished'
|
||||
}
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('immediate check false', async () => {
|
||||
const wrapper = mount(List, {
|
||||
propsData: {
|
||||
|
||||
Reference in New Issue
Block a user