Skip to content

Commit

Permalink
fix another type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jloleysens committed Aug 19, 2020
1 parent fb33cb6 commit 6768fc0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/plugins/console/server/__tests__/proxy_route/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const defaultProxyValue = Object.freeze({
});

interface MockDepsArgument extends Partial<Omit<RouteDependencies, 'proxy'>> {
proxy: Partial<ProxyDependencies>;
proxy?: Partial<ProxyDependencies>;
}

export const getProxyRouteHandlerDeps = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('Console Proxy Route', () => {
describe('one match', () => {
it('allows the request', async () => {
handler = createHandler(
getProxyRouteHandlerDeps({ pathFilters: [/^\/foo\//, /^\/bar\//] })
getProxyRouteHandlerDeps({ proxy: { pathFilters: [/^\/foo\//, /^\/bar\//] } })
);

(requestModule.proxyRequest as jest.Mock).mockResolvedValue(createResponseStub('foo'));
Expand All @@ -68,7 +68,9 @@ describe('Console Proxy Route', () => {
});
describe('all match', () => {
it('allows the request', async () => {
handler = createHandler(getProxyRouteHandlerDeps({ pathFilters: [/^\/foo\//] }));
handler = createHandler(
getProxyRouteHandlerDeps({ proxy: { pathFilters: [/^\/foo\//] } })
);

(requestModule.proxyRequest as jest.Mock).mockResolvedValue(createResponseStub('foo'));

Expand Down

0 comments on commit 6768fc0

Please sign in to comment.