KC's Workspace
    Preparing search index...

    The result of calling a task.

    interface TaskResult {
        duration?: number;
        errors?: TestError[];
        heap?: number;
        hooks?: Partial<Record<keyof SuiteHooks<object>, TaskState>>;
        repeatCount?: number;
        retryCount?: number;
        startTime?: number;
        state: TaskState;
    }
    Index

    Properties

    duration?: number

    How long in milliseconds the task took to run.

    errors?: TestError[]

    Errors that occurred during the task execution. It is possible to have several errors if expect.soft() failed multiple times or retry was triggered.

    heap?: number

    Heap size in bytes after the task finished. Only available if logHeapUsage option is set and process.memoryUsage is defined.

    hooks?: Partial<Record<keyof SuiteHooks<object>, TaskState>>

    State of related to this task hooks. Useful during reporting.

    repeatCount?: number

    The amount of times the task was repeated. The task is repeated only if repeats option is set. This number also contains retryCount.

    retryCount?: number

    The amount of times the task was retried. The task is retried only if it failed and retry option is set.

    startTime?: number

    Time in milliseconds when the task started running.

    state: TaskState

    State of the task. Inherits the task.mode during collection. When the task has finished, it will be changed to pass or fail.

    • pass: task ran successfully
    • fail: task failed