Sha256: c645edc763952ae77bfd33ead38392d3029691dfd8172ce4a73acf9806d3c3ae
Contents?: true
Size: 695 Bytes
Versions: 43
Compression:
Stored size: 695 Bytes
Contents
import React from 'react'; import { shallow } from 'enzyme'; import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils'; import Dashboard from '../Dashboard'; import { props } from '../Dashboard.fixtures'; const fixtures = { 'with props': props, }; describe('Dashboard', () => { describe('rendering', () => testComponentSnapshotsWithFixtures(Dashboard, fixtures)); it('componentWillUnmount should call "stopPolling"', () => { const stopPolling = jest.fn(); const modifiedProps = { ...props, stopPolling, }; const wrapper = shallow(<Dashboard {...modifiedProps} />); wrapper.unmount(); expect(stopPolling).toBeCalled(); }); });
Version data entries
43 entries across 43 versions & 2 rubygems