Skip to content

Commit

Permalink
Fix jest test
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisronline committed Mar 31, 2020
1 parent 9a7746a commit 845ee7b
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React from 'react';
import { shallow } from 'enzyme';
import { kfetch } from 'ui/kfetch';
import { AlertsStatus, AlertsStatusProps } from './status';
import { ALERT_TYPE_PREFIX } from '../../../common/constants';
import { ALERT_TYPES } from '../../../common/constants';
import { getSetupModeState } from '../../lib/setup_mode';
import { mockUseEffects } from '../../jest.helpers';

Expand Down Expand Up @@ -63,11 +63,7 @@ describe('Status', () => {

it('should render a success message if all alerts have been migrated and in setup mode', async () => {
(kfetch as jest.Mock).mockReturnValue({
data: [
{
alertTypeId: ALERT_TYPE_PREFIX,
},
],
data: ALERT_TYPES.map(type => ({ alertTypeId: type })),
});

(getSetupModeState as jest.Mock).mockReturnValue({
Expand Down

0 comments on commit 845ee7b

Please sign in to comment.