UNPKG

kitten-components

Version:
43 lines (37 loc) 1.03 kB
import React from 'react' import renderer from 'react-test-renderer' import { VerticalCardWithAction } from 'kitten/components/cards/vertical-card-with-action' describe('<VerticalCardWithAction />', () => { let component describe('by default', () => { beforeEach(() => { component = renderer .create(<VerticalCardWithAction title="Custom title" button="button" />) .toJSON() }) it('matches with snapshot', () => { expect(component).toMatchSnapshot() }) }) describe('with some props', () => { beforeEach(() => { component = renderer .create( <VerticalCardWithAction imageProps={{ src: '#image', alt: 'Image alt', }} title="Custom title" description="Custom text" button="button" buttonModifier="helium" />, ) .toJSON() }) it('matches with snapshot', () => { expect(component).toMatchSnapshot() }) }) })