Sha256: 4d2932afbc479cb823c1d923a14f64790b4891b948a878173015ed60d7b48590
Contents?: true
Size: 709 Bytes
Versions: 9
Compression:
Stored size: 709 Bytes
Contents
import { testActionSnapshotWithFixtures } from '@theforeman/test'; 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
9 entries across 9 versions & 1 rubygems