import { httpServerMock } from '../http/http_server.mocks' ; import { HttpResources , HttpResourcesServiceToolkit } from './types' ; const createHttpResourcesMock = ( ) : jest . Mocked < HttpResources > => ( { register : jest . fn ( ) , } ) ; function createInternalHttpResourcesSetup ( ) { return { createRegistrar : jest . fn ( ( ) => createHttpResourcesMock ( ) ) , } ; } function createHttpResourcesResponseFactory ( ) { const mocked = { renderCoreApp : jest . fn ( ) , renderAnonymousCoreApp : jest . fn ( ) , renderHtml : jest . fn ( ) , renderJs : jest . fn ( ) , } ; return { ... httpServerMock . createResponseFactory ( ) , ... mocked , } ; } export const httpResourcesMock = { createRegistrar : createHttpResourcesMock , createSetupContract : createInternalHttpResourcesSetup , createResponseFactory : createHttpResourcesResponseFactory , } ;