You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
873 B
33 lines
873 B
import Image from '..';
|
|
import mountTest from '../../../tests/shared/mountTest';
|
|
import { mount } from '@vue/test-utils';
|
|
describe('Image', () => {
|
|
mountTest(Image);
|
|
it('image size', () => {
|
|
const wrapper = mount({
|
|
render() {
|
|
return (
|
|
<Image
|
|
width="200px"
|
|
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
|
|
/>
|
|
);
|
|
},
|
|
});
|
|
expect(wrapper.find('.ant-image').element.style.width).toBe('200px');
|
|
});
|
|
it('image size number', () => {
|
|
const wrapper = mount({
|
|
render() {
|
|
return (
|
|
<Image
|
|
width={200}
|
|
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
|
|
/>
|
|
);
|
|
},
|
|
});
|
|
expect(wrapper.find('.ant-image').element.style.width).toBe('200px');
|
|
});
|
|
});
|