import { EphemeralTaskLifecycle } from './ephemeral_task_lifecycle' ; import { TaskLifecycleEvent } from './polling_lifecycle' ; import { of , Observable } from 'rxjs' ; export const ephemeralTaskLifecycleMock = { create ( opts ) { return { attemptToRun : jest . fn ( ) , get events ( ) { return opts . events$ ?? of ( ) ; } , get queuedTasks ( ) { return opts . getQueuedTasks ? opts . getQueuedTasks ( ) : 0 ; } , } as unknown as jest . Mocked < EphemeralTaskLifecycle > ; } , } ;