Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecote committed Oct 14, 2020
1 parent c621e0f commit f2e1dba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,9 @@ describe('create()', () => {
"scheduledTaskId": "task-123",
}
`);
const actionsClient = await alertsClientParams.getActionsClient();
const actionsClient = (await alertsClientParams.getActionsClient()) as jest.Mocked<
ActionsClient
>;
expect(actionsClient.isActionTypeEnabled).toHaveBeenCalledWith('test', { notifyUsage: true });
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { encryptedSavedObjectsMock } from '../../../../encrypted_saved_objects/s
import { actionsAuthorizationMock } from '../../../../actions/server/mocks';
import { AlertsAuthorization } from '../../authorization/alerts_authorization';
import { resolvable } from '../../test_utils';
import { ActionsAuthorization } from '../../../../actions/server';
import { ActionsAuthorization, ActionsClient } from '../../../../actions/server';
import { TaskStatus } from '../../../../task_manager/server';
import { getBeforeSetup, setGlobalDate } from './lib';

Expand Down Expand Up @@ -319,7 +319,9 @@ describe('update()', () => {
"version": "123",
}
`);
const actionsClient = await alertsClientParams.getActionsClient();
const actionsClient = (await alertsClientParams.getActionsClient()) as jest.Mocked<
ActionsClient
>;
expect(actionsClient.isActionTypeEnabled).toHaveBeenCalledWith('test', { notifyUsage: true });
expect(actionsClient.isActionTypeEnabled).toHaveBeenCalledWith('test2', { notifyUsage: true });
});
Expand Down

0 comments on commit f2e1dba

Please sign in to comment.