TinyTick logoTinyTick

Task

The Task type represents a task function that has been registered with the Manager.

(
  arg: string | undefined,
  signal: AbortSignal,
  info: TaskRunInfo,
): Promise<unknown>
TypeDescription
argstring | undefined

A string argument that might have been provided when the task was scheduled to run (or undefined if not).

signalAbortSignal

An AbortSignal that can be used to detect that the Task should cease execution.

infoTaskRunInfo

A TaskRunInfo object representing information about this test run.

returnsPromise<unknown>

A task is an asynchronous function that is passed an optional string argument, an AbortSignal to indicate that execution should be ceased, and a reference to the Manager so that additional task runs can be scheduled if needed.

Note that a task can throw an exception to indicate that it has failed. It will then be considered for retrying if the run's TaskRunConfig allows for it.

Since

v1.0.0