Sha256: 957539cc54a7dbb227b936433e9b1852bff7becc3bfca7a751ca1956c2c79f8e
Contents?: true
Size: 664 Bytes
Versions: 105
Compression:
Stored size: 664 Bytes
Contents
import React from 'react'; import { shallow, testComponentSnapshotsWithFixtures } from '@theforeman/test'; 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
105 entries across 105 versions & 2 rubygems