Sha256: 2c438339527e0ca59129c8ef82487bad635f6ec7949471f2dafbb0266634ddb4
Contents?: true
Size: 679 Bytes
Versions: 10
Compression:
Stored size: 679 Bytes
Contents
import { testActionSnapshotWithFixtures } from 'react-redux-test-utils'; import API from 'foremanReact/API'; import { handleToggle } from '../IpsObfuscationSwitcherActions'; import { handleToggleResponse } from '../IpsObfuscationSwitcher.fixtures'; jest.mock('foremanReact/API'); API.post.mockImplementation(async () => handleToggleResponse); const fixtures = { 'should handleToggle': () => handleToggle(false), 'should handleError': () => { API.post.mockImplementationOnce(() => Promise.reject(new Error('test error')) ); return handleToggle(false); }, }; describe('IpsObfuscationSwitcher actions', () => testActionSnapshotWithFixtures(fixtures));
Version data entries
10 entries across 10 versions & 1 rubygems