import { of } from 'rxjs' ; import { Capabilities } from 'src/core/server' ; import { savedObjectsTypeRegistryMock , savedObjectsClientMock , uiSettingsServiceMock , capabilitiesServiceMock , } from '../../../../../src/core/server/mocks' ; const createContextMock = ( capabilities = { } ) => { return { core : { savedObjects : { client : savedObjectsClientMock . create ( ) , typeRegistry : savedObjectsTypeRegistryMock . create ( ) , } , uiSettings : { client : uiSettingsServiceMock . createClient ( ) , } , capabilities : of ( { ... capabilitiesServiceMock . createCapabilities ( ) , ... capabilities , } as Capabilities ) , } , } ; } ; const createFactoryMock = ( ) => ( ) => ( ) => createContextMock ( ) ; export const contextMock = { create : createContextMock , createFactory : createFactoryMock , } ;