Sha256: 05923fa845e7c00779476649e8890ba52a4369e47c51a8fbd56731dc6cae6260
Contents?: true
Size: 715 Bytes
Versions: 10
Compression:
Stored size: 715 Bytes
Contents
import { testActionSnapshotWithFixtures } from 'react-redux-test-utils'; import API from 'foremanReact/API'; import { handleToggle } from '../ExcludePackagesSwitcherActions'; import { handleToggleResponse } from '../ExcludePackagesSwitcher.fixtures'; jest.mock('foremanReact/API'); API.post.mockImplementation(async () => handleToggleResponse); const fixtures = { 'should handleToggle': () => handleToggle(), 'should invoke toast notification upon failure of handleToggle': () => { API.post.mockImplementationOnce(() => Promise.reject(new Error('test error')) ); return handleToggle(); }, }; describe('ExcludePackagesSwitcher actions', () => testActionSnapshotWithFixtures(fixtures));
Version data entries
10 entries across 10 versions & 1 rubygems