mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-10 01:08:57 +08:00
32 lines
637 B
JavaScript
32 lines
637 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).toMatchSnapshot();
|
|
});
|
|
|
|
test('render page slot', () => {
|
|
const wrapper = mount(Paginaion, {
|
|
propsData: {
|
|
totalItems: 50,
|
|
showPageSize: 5,
|
|
},
|
|
scopedSlots: {
|
|
page: ({ text }) => `${text}`,
|
|
},
|
|
});
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|