@onextech/react-semantic-booster
Version:
Extended components for react-semantic-ui
24 lines (21 loc) • 729 B
JavaScript
import React from 'react';
import renderer from 'react-test-renderer';
import { MemoryRouter as Router } from 'react-router-dom';
import { action } from '@storybook/addon-actions';
import PhotoCard from '.';
import { firstPhotoCard } from './index.story';
describe('<PhotoCard>', () => {
it('renders correctly', () => {
const tree = renderer
.create(<Router><PhotoCard
onClick={action('clicked')}
animated="scale"
content={firstPhotoCard.content}
cardProps={{ card: firstPhotoCard.key, fluid: true }}
headerProps={{ inverted: true, size: 'large' }}
imgProps={firstPhotoCard.imgProps} />
</Router>)
.toJSON();
expect(tree).toMatchSnapshot();
});
});