import { TaskPollingLifecycle , TaskLifecycleEvent } from './polling_lifecycle' ; import { of , Observable } from 'rxjs' ; export const taskPollingLifecycleMock = { create ( opts ) { return { attemptToRun : jest . fn ( ) , get isStarted ( ) { return opts . isStarted ?? true ; } , get events ( ) { return opts . events$ ?? of ( ) ; } , } as unknown as jest . Mocked < TaskPollingLifecycle > ; } , } ;