Skip to content

Commit

Permalink
Fix types issues in jest test
Browse files Browse the repository at this point in the history
  • Loading branch information
jloleysens committed Mar 17, 2020
1 parent ca2cd89 commit 3cbb917
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ import { licensePreRoutingFactory } from '../license_pre_routing_factory';

describe('license_pre_routing_factory', () => {
describe('#reportingFeaturePreRoutingFactory', () => {
let mockDeps;
let mockLicenseCheckResults;
let mockDeps: any;
let mockLicenseCheckResults: any;

const anyContext: any = {};
const anyRequest: any = {};

beforeEach(() => {
mockDeps = {
Expand Down Expand Up @@ -39,7 +42,7 @@ describe('license_pre_routing_factory', () => {

it('replies with 403', async () => {
const licensePreRouting = licensePreRoutingFactory(mockDeps);
const response = await licensePreRouting({}, {}, kibanaResponseFactory);
const response = await licensePreRouting(anyContext, anyRequest, kibanaResponseFactory);
expect(response.status).toBe(403);
});
});
Expand All @@ -53,7 +56,7 @@ describe('license_pre_routing_factory', () => {

it('it calls the wrapped handler', async () => {
const licensePreRouting = licensePreRoutingFactory(mockDeps);
await licensePreRouting({}, {}, kibanaResponseFactory);
await licensePreRouting(anyContext, anyRequest, kibanaResponseFactory);
expect(mockDeps.requestHandler).toHaveBeenCalledTimes(1);
});
});
Expand Down

0 comments on commit 3cbb917

Please sign in to comment.