From 68767acb1c8a027a2dde7967d64a2adba24c80bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 4 Sep 2018 13:15:45 -0700 Subject: [PATCH] fix: Updated test --- public/app/features/alerting/AlertRuleList.test.tsx | 6 +----- .../alerting/__snapshots__/AlertRuleList.test.tsx.snap | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/public/app/features/alerting/AlertRuleList.test.tsx b/public/app/features/alerting/AlertRuleList.test.tsx index 3c0c410d1a9..70892d86589 100644 --- a/public/app/features/alerting/AlertRuleList.test.tsx +++ b/public/app/features/alerting/AlertRuleList.test.tsx @@ -4,10 +4,6 @@ import { AlertRuleList, Props } from './AlertRuleList'; import { AlertRule, NavModel } from '../../types'; import appEvents from '../../core/app_events'; -jest.mock('react-redux', () => ({ - connect: () => params => params, -})); - jest.mock('../../core/app_events', () => ({ emit: jest.fn(), })); @@ -93,7 +89,7 @@ describe('Life cycle', () => { const { instance } = setup(); instance.fetchRules = jest.fn(); - instance.componentDidUpdate({ stateFilter: 'ok' }); + instance.componentDidUpdate({ stateFilter: 'ok' } as Props); expect(instance.fetchRules).toHaveBeenCalled(); }); diff --git a/public/app/features/alerting/__snapshots__/AlertRuleList.test.tsx.snap b/public/app/features/alerting/__snapshots__/AlertRuleList.test.tsx.snap index 99869ba6126..46000d974db 100644 --- a/public/app/features/alerting/__snapshots__/AlertRuleList.test.tsx.snap +++ b/public/app/features/alerting/__snapshots__/AlertRuleList.test.tsx.snap @@ -101,7 +101,7 @@ exports[`Render should render alert rules 1`] = `
    - -