Skip to content

Commit

Permalink
Fix jest test & TS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sebelga committed Jan 31, 2024
1 parent 4797ee4 commit c3e07b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/plugins/content_management/server/plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ describe('ContentManagementPlugin', () => {
// Each procedure has been called with the context and input
const context = {
requestHandlerContext: mockedRequestHandlerContext,
request: expect.any(Object),
contentRegistry: 'mockedContentRegistry',
getTransformsFactory: expect.any(Function),
mSearchService: expect.any(MSearchService),
};
expect(mockGet).toHaveBeenCalledWith(context, input);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
* Side Public License, v 1.
*/

import type { Version } from '@kbn/object-versioning';
import { savedObjectsClientMock } from '@kbn/core-saved-objects-api-server-mocks';

import { MSearchIn, MSearchQuery } from '../../../common';
import { validate, getServiceObjectTransformFactory } from '../../utils';
import { validate, disableTransformsCache } from '../../utils';
import { ContentRegistry } from '../../core/registry';
import { createMockedStorage } from '../../core/mocks';
import { EventBus } from '../../core/event_bus';
import { MSearchService } from '../../core/msearch';
import { mSearch } from './msearch';

disableTransformsCache();
const storageContextGetTransforms = jest.fn();
const spy = () => storageContextGetTransforms;

Expand Down Expand Up @@ -150,8 +150,6 @@ describe('RPC -> mSearch()', () => {
const ctx: any = {
contentRegistry,
requestHandlerContext,
getTransformsFactory: (contentTypeId: string, version: Version) =>
getServiceObjectTransformFactory(contentTypeId, version, { cacheEnabled: false }),
mSearchService,
};

Expand Down

0 comments on commit c3e07b2

Please sign in to comment.