import { TestBedConfig } from '@kbn/test/jest' ; import { AppServicesContext } from '../../../../../public/types' ; import { createTogglePhaseAction , createNodeAllocationActions } from '../../../helpers' ; import { initTestBed } from '../../init_test_bed' ; type SetupReturn = ReturnType < typeof setupCloudNodeAllocation > ; export type CloudNodeAllocationTestBed = SetupReturn extends Promise < infer U > ? U : SetupReturn ; export const setupCloudNodeAllocation = async ( arg ? ) => { const testBed = await initTestBed ( arg ) ; return { ... testBed , actions : { togglePhase : createTogglePhaseAction ( testBed ) , warm : { ... createNodeAllocationActions ( testBed , 'warm' ) , } , cold : { ... createNodeAllocationActions ( testBed , 'cold' ) , } , } , } ; } ;