Skip to content

Commit

Permalink
fix mock
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Jun 29, 2022
1 parent 42cd485 commit 53672cd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/server/http/http_server.mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
CoreKibanaRequest,
LifecycleResponseFactory,
RouteMethod,
KibanaRequest,
KibanaResponseFactory,
RouteValidationSpec,
KibanaRouteOptions,
Expand Down Expand Up @@ -62,9 +63,12 @@ function createKibanaRequestMock<P = any, Q = any, B = any>({
routeAuthRequired,
validation = {},
kibanaRouteOptions = { xsrfRequired: true },
kibanaRequestState = { requestId: '123', requestUuid: '123e4567-e89b-12d3-a456-426614174000' },
kibanaRequestState = {
requestId: '123',
requestUuid: '123e4567-e89b-12d3-a456-426614174000',
},
auth = { isAuthenticated: true },
}: RequestFixtureOptions<P, Q, B> = {}) {
}: RequestFixtureOptions<P, Q, B> = {}): KibanaRequest<P, Q, B> {
const queryString = stringify(query, { sort: false });
const url = new URL(`${path}${queryString ? `?${queryString}` : ''}`, 'http://localhost');

Expand Down

0 comments on commit 53672cd

Please sign in to comment.