import React from 'react';
import Transition from '../../components/Transition';
import { shallow } from '../enzyme';
describe('Transition', () => {
it('should be defined', () => {
expect(Transition).toBeDefined();
});
it('should render correctly', () => {
const tree = shallow(
test
);
expect(tree).toMatchSnapshot();
});
it('should update classname', () => {
const tree = shallow(
test
);
expect(tree.find('div').text()).toContain('test');
expect(tree.find('div').length).toBe(1);
expect(tree.find('CSSTransition').hasClass('slide-in-bottom')).toEqual(
false
);
});
it('used as wrapper', () => {
const tree = shallow(
test
);
expect(tree.find('div').length).toBe(2);
});
});