mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
32 lines
651 B
JavaScript
32 lines
651 B
JavaScript
import { mount } from '../../../test';
|
|
import Paginaion from '..';
|
|
|
|
test('render prev-text & next-text slot', () => {
|
|
const wrapper = mount(Paginaion, {
|
|
propsData: {
|
|
totalItems: 50,
|
|
showPageSize: 5,
|
|
},
|
|
scopedSlots: {
|
|
'prev-text': () => 'Custom PrevText',
|
|
'next-text': () => 'Custom NextText',
|
|
},
|
|
});
|
|
|
|
expect(wrapper.html()).toMatchSnapshot();
|
|
});
|
|
|
|
test('render page slot', () => {
|
|
const wrapper = mount(Paginaion, {
|
|
propsData: {
|
|
totalItems: 50,
|
|
showPageSize: 5,
|
|
},
|
|
scopedSlots: {
|
|
page: ({ text }) => `${text}`,
|
|
},
|
|
});
|
|
|
|
expect(wrapper.html()).toMatchSnapshot();
|
|
});
|