Skip to content

Commit

Permalink
more test type failures fixes, bis
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Apr 20, 2022
1 parent 0614bbd commit 4937199
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe('Handle request to generate', () => {
(mockResponseFactory.badRequest as jest.Mock) = jest.fn((args: unknown) => args);

mockContext = getMockContext();
mockContext.reporting = {} as ReportingSetup;
mockContext.reporting = Promise.resolve({} as ReportingSetup);

requestHandler = new RequestHandler(
reportingCore,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { EndpointAuthorizationError } from '../errors';

describe('When using `withEndpointAuthz()`', () => {
let mockRequestHandler: jest.Mocked<RequestHandler>;
let mockContext: jest.Mocked<ReturnType<typeof requestContextMock.create>>;
let mockContext: ReturnType<typeof requestContextMock.create>;
let mockRequest: ReturnType<typeof httpServerMock.createKibanaRequest>;
let mockResponse: ReturnType<typeof httpServerMock.createResponseFactory>;
let logger: ReturnType<typeof loggingSystemMock.createLogger>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const createMockClients = () => {
type MockClients = ReturnType<typeof createMockClients>;

export type SecuritySolutionRequestHandlerContextMock = MockedKeys<
AwaitedProperties<SecuritySolutionRequestHandlerContext>
AwaitedProperties<Omit<SecuritySolutionRequestHandlerContext, 'resolve'>>
> & {
core: MockClients['core'];
};
Expand Down

0 comments on commit 4937199

Please sign in to comment.