import { createNodeAllocationActions , createTogglePhaseAction } from '../../../helpers' ; import { initTestBed } from '../../init_test_bed' ; type SetupReturn = ReturnType < typeof setupColdPhaseNodeAllocation > ; export type NodeAllocationTestBed = SetupReturn extends Promise < infer U > ? U : SetupReturn ; export const setupColdPhaseNodeAllocation = async ( ) => { const testBed = await initTestBed ( ) ; return { ... testBed , actions : { toggleColdPhase : ( ) => createTogglePhaseAction ( testBed ) ( 'cold' ) , ... createNodeAllocationActions ( testBed , 'cold' ) , } , } ; } ;