import { Task } from '../../src'; /** * Dummy task lets us set expectations for (eventual) calls to {@link Task#execute} by * the task scheduler. * * It also (and more importantly) allows us to retrieve the promises given to the * task scheduler, letting a testcase wait until the scheduler makes a particular call. */ export default class MockTask implements Task { private promises; private resolvers; private callCount; private shutdownCallCount; constructor(); execute(): Promise; shutdown(): void; getCallResult(callNumber: number): Promise; /** * Set result of a particular call. * * If `result` is a string, call will throw an Error with that message. * If `result` is a boolean, call will resolve to that value. * If `result` is a function, it will be called to obtain a boolean or string. */ setCallResult(callNumber: number, result?: boolean | string | Function): void; private addDelayedPromise; getShutdownCallCount(): number; }