* Rename alerts plugin to alerting * Deprecate old config values * Few more renames * Update plugin list * Rename xpack.alerts -> xpack.alerting * Fix some ESLint rules * Fix typecheck * Fix some test failures * Some more renames * Fix ESLint * Fix some test failures * Fix failing jest test * Undo exclusive test * Fix APM deps * Fix docs Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
26 lines
741 B
TypeScript
26 lines
741 B
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
* 2.0.
|
|
*/
|
|
|
|
import { AlertingPublicPlugin } from './plugin';
|
|
|
|
export type Setup = jest.Mocked<ReturnType<AlertingPublicPlugin['setup']>>;
|
|
export type Start = jest.Mocked<ReturnType<AlertingPublicPlugin['start']>>;
|
|
|
|
const createSetupContract = (): Setup => ({
|
|
registerNavigation: jest.fn(),
|
|
registerDefaultNavigation: jest.fn(),
|
|
});
|
|
|
|
const createStartContract = (): Start => ({
|
|
getNavigation: jest.fn(),
|
|
});
|
|
|
|
export const alertingPluginMock = {
|
|
createSetupContract,
|
|
createStartContract,
|
|
};
|