Skip to content

Commit

Permalink
Add public mock for SiemClient
Browse files Browse the repository at this point in the history
  • Loading branch information
rylnd committed Apr 20, 2020
1 parent f92d564 commit 87228f4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions x-pack/plugins/siem/server/mocks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { SiemClient } from './types';

type SiemClientMock = jest.Mocked<SiemClient>;
const createSiemClientMock = (): SiemClientMock =>
(({
getSignalsIndex: jest.fn(),
} as unknown) as SiemClientMock);

export const siemMock = {
createClient: createSiemClientMock,
};

0 comments on commit 87228f4

Please sign in to comment.