Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Reporting] Clean Up TypeScript Definitions #76566

Merged
merged 19 commits into from
Sep 22, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
revert unneeded create mock changes
tsullivan committed Sep 18, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit c72952e915387064dc1d3a01f44816eb086a1dbb
Original file line number Diff line number Diff line change
@@ -9,10 +9,8 @@ jest.mock('../usage');
jest.mock('../browsers');
jest.mock('../lib/create_queue');

import { IUiSettingsClient } from 'kibana/public';
import _ from 'lodash';
import * as Rx from 'rxjs';
import { SavedObjectsServiceStart, UiSettingsServiceStart } from 'src/core/server';
import { ReportingConfig, ReportingCore } from '../';
import { featuresPluginMock } from '../../../features/server/mocks';
import {
@@ -54,16 +52,10 @@ const createMockPluginStart = (
): ReportingInternalStart => {
const store = new ReportingStore(mockReportingCore, logger);
return {
browserDriverFactory: startMock.browserDriverFactory!,
esqueue: startMock.esqueue!,
savedObjects:
startMock.savedObjects ||
(({ getScopedClient: jest.fn() } as unknown) as SavedObjectsServiceStart),
uiSettings:
startMock.uiSettings ||
(({
asScopedToClient: () => (({ get: jest.fn() } as unknown) as IUiSettingsClient),
} as unknown) as UiSettingsServiceStart),
browserDriverFactory: startMock.browserDriverFactory,
esqueue: startMock.esqueue,
savedObjects: startMock.savedObjects || { getScopedClient: jest.fn() },
uiSettings: startMock.uiSettings || { asScopedToClient: () => ({ get: jest.fn() }) },
store,
};
};