ant-design/components/carousel/__tests__/index.test.js

14 lines
443 B
JavaScript
Raw Normal View History

import React from 'react';
import { mount } from 'enzyme';
import Carousel from '..';
describe('Carousel', () => {
it('should has innerSlider', () => {
const wrapper = mount(<Carousel><div /></Carousel>);
2017-10-09 13:23:20 +08:00
const { innerSlider } = wrapper.node;
const innerSliderFromRefs = wrapper.node.refs.slick.innerSlider;
expect(innerSlider).toBe(innerSliderFromRefs);
expect(typeof innerSlider.slickNext).toBe('function');
});
});