ant-design-vue/components/list/__tests__/index.test.js

29 lines
651 B
JavaScript
Raw Normal View History

2019-01-12 03:33:27 +00:00
import { mount } from '@vue/test-utils';
import { asyncExpect } from '@/tests/utils';
import List from '..';
describe('List', () => {
it('locale not passed to internal div', async () => {
2019-01-12 03:33:27 +00:00
const locale = { emptyText: 'Custom text' };
const wrapper = mount(
{
render() {
return (
<List
dataSource={[]}
renderItem={item => <List.Item>{item}</List.Item>}
locale={locale}
/>
);
},
},
2019-01-12 03:33:27 +00:00
{
sync: false,
},
);
await asyncExpect(() => {
2019-01-12 03:33:27 +00:00
expect(wrapper.props().locale).toBe(undefined);
});
});
});