Sha256: a2a97171f055d6b4b2792b771567bf641b430c6f8ab7748c4f4a10cabc6310d7
Contents?: true
Size: 768 Bytes
Versions: 7
Compression:
Stored size: 768 Bytes
Contents
import React from 'react'; import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils'; import { shallow } from 'enzyme'; import { ResumeButton } from './ResumeButton'; const fixtures = { 'render with minimal props': { id: 'some-id', name: 'some-name', }, }; describe('ResumeButton', () => { describe('rendering', () => testComponentSnapshotsWithFixtures(ResumeButton, fixtures)); describe('should use id and name on click', () => { const onClick = jest.fn(); const id = 'some-id'; const name = 'some-name'; const component = shallow( <ResumeButton id={id} name={name} onClick={onClick} /> ); component.find('Button').simulate('click'); expect(onClick).toHaveBeenCalledWith(id, name); }); });
Version data entries
7 entries across 7 versions & 1 rubygems