import { createMinAgeActions , createTogglePhaseAction } from '../../helpers' ; import { initTestBed } from '../init_test_bed' ; type SetupReturn = ReturnType < typeof setupTimingTestBed > ; export type TimingTestBed = SetupReturn extends Promise < infer U > ? U : SetupReturn ; export const setupTimingTestBed = async ( ) => { const testBed = await initTestBed ( ) ; return { ... testBed , actions : { togglePhase : createTogglePhaseAction ( testBed ) , warm : { ... createMinAgeActions ( testBed , 'warm' ) , } , cold : { ... createMinAgeActions ( testBed , 'cold' ) , } , frozen : { ... createMinAgeActions ( testBed , 'frozen' ) , } , delete : { ... createMinAgeActions ( testBed , 'delete' ) , } , } , } ; } ;