feat(List): add error slot
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`error slot 1`] = `
|
||||
<div role="feed" class="van-list">
|
||||
<div class="van-list__error-text">Custom Error</div>
|
||||
<div class="van-list__placeholder"></div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`finished slot 1`] = `
|
||||
<div role="feed" class="van-list">
|
||||
<div class="van-list__finished-text">Custom Finished</div>
|
||||
|
||||
@@ -83,6 +83,19 @@ test('finished slot', async () => {
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('error slot', async () => {
|
||||
const wrapper = mount(List, {
|
||||
propsData: {
|
||||
error: true
|
||||
},
|
||||
scopedSlots: {
|
||||
error: () => 'Custom Error'
|
||||
}
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('immediate check false', async () => {
|
||||
const wrapper = mount(List, {
|
||||
propsData: {
|
||||
|
||||
Reference in New Issue
Block a user