Sha256: 289a947be8ac886fa5023502afdde61c9971d53665e5c1008856660ffc903382

Contents?: true

Size: 635 Bytes

Versions: 10

Compression:

Stored size: 635 Bytes

Contents

import { testActionSnapshotWithFixtures } from 'react-redux-test-utils';
import API from 'foremanReact/API';
import { fetchHits } from '../InsightsTabActions';
import { hostID, hits } from './InsightsTab.fixtures';

jest.mock('foremanReact/API');
API.get.mockImplementation(async () => ({ data: { hits } }));

const fixtures = {
  'should fetchHits': () => fetchHits(hostID),
  'should fetchHits with error': () => {
    API.get.mockImplementationOnce(() =>
      Promise.reject(new Error('Network error!'))
    );
    return fetchHits(hostID);
  },
};

describe('InsightsTab actions', () => testActionSnapshotWithFixtures(fixtures));

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
foreman_rh_cloud-1.0.18 webpack/InsightsHostDetailsTab/__tests__/InsightsTabActions.test.js
foreman_rh_cloud-1.0.17 webpack/InsightsHostDetailsTab/__tests__/InsightsTabActions.test.js
foreman_rh_cloud-1.0.16 webpack/InsightsHostDetailsTab/__tests__/InsightsTabActions.test.js
foreman_rh_cloud-1.0.15 webpack/InsightsHostDetailsTab/__tests__/InsightsTabActions.test.js
foreman_rh_cloud-1.0.14 webpack/InsightsHostDetailsTab/__tests__/InsightsTabActions.test.js
foreman_rh_cloud-0.9.14 webpack/InsightsHostDetailsTab/__tests__/InsightsTabActions.test.js
foreman_rh_cloud-0.9.13.1 webpack/InsightsHostDetailsTab/__tests__/InsightsTabActions.test.js
foreman_rh_cloud-1.0.13.1 webpack/InsightsHostDetailsTab/__tests__/InsightsTabActions.test.js
foreman_rh_cloud-0.9.13 webpack/InsightsHostDetailsTab/__tests__/InsightsTabActions.test.js
foreman_rh_cloud-1.0.13 webpack/InsightsHostDetailsTab/__tests__/InsightsTabActions.test.js