Skip to content

Commit

Permalink
more test type failures fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Apr 20, 2022
1 parent 169c73b commit 861b5ee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('When calling package policy', () => {
let routerMock: jest.Mocked<FleetAuthzRouter>;
let routeHandler: FleetRequestHandler<any, any, any>;
let routeConfig: RouteConfig<any, any, any, any>;
let context: jest.Mocked<FleetRequestHandlerContext>;
let context: FleetRequestHandlerContext;
let response: ReturnType<typeof httpServerMock.createResponseFactory>;

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/server/routes/setup/handlers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jest.mock('../../services/setup', () => {
const mockSetupFleet = setupFleet as jest.MockedFunction<typeof setupFleet>;

describe('FleetSetupHandler', () => {
let context: AwaitedProperties<FleetRequestHandlerContext>;
let context: AwaitedProperties<Omit<FleetRequestHandlerContext, 'resolve'>>;
let response: ReturnType<typeof httpServerMock.createResponseFactory>;
let request: ReturnType<typeof httpServerMock.createKibanaRequest>;

Expand Down
7 changes: 3 additions & 4 deletions x-pack/plugins/reporting/server/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import type { IRouter, Logger, RequestHandlerContext } from '@kbn/core/server';
import type { IRouter, Logger, CustomRequestHandlerContext } from '@kbn/core/server';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import type { DataPluginStart } from '@kbn/data-plugin/server/plugin';
import { FieldFormatsStart } from '@kbn/field-formats-plugin/server';
Expand Down Expand Up @@ -113,10 +113,9 @@ export interface ReportingStartDeps {
taskManager: TaskManagerStartContract;
}

export interface ReportingRequestHandlerContext {
export type ReportingRequestHandlerContext = CustomRequestHandlerContext<{
reporting: ReportingStart | null;
core: RequestHandlerContext['core'];
}
}>;

export type ReportingPluginRouter = IRouter<ReportingRequestHandlerContext>;

Expand Down

0 comments on commit 861b5ee

Please sign in to comment.