KC's Workspace
    Preparing search index...
    interface File {
        collectDuration?: number;
        concurrent?: boolean;
        dynamic?: boolean;
        each?: boolean;
        file: File;
        filepath: string;
        fullName: string;
        fullTestName?: string;
        id: string;
        importDurations?: Record<string, ImportDuration>;
        location?: { column: number; line: number };
        meta: TaskMeta;
        mode: RunMode;
        name: string;
        pool?: string;
        projectName: string | undefined;
        repeats?: number;
        result?: TaskResult;
        retry?: number;
        setupDuration?: number;
        shuffle?: boolean;
        suite?: Suite;
        tasks: Task[];
        type: "suite";
        viteEnvironment?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    collectDuration?: number

    The time it took to collect all tests in the file. This time also includes importing all the file dependencies.

    concurrent?: boolean

    Whether the task should run concurrently with other tasks.

    dynamic?: boolean

    If the test was collected by parsing the file AST, and the name is not a static string, this property will be set to true.

    each?: boolean

    Whether the task was produced with .each() method.

    file: File

    File task. It's the root task of the file.

    filepath: string

    The path to the file in UNIX format.

    fullName: string

    Full name including the file path, any parent suites, and this task's name.

    Uses > as the separator between levels.

    // file
    'test/task-names.test.ts'
    // suite
    'test/task-names.test.ts > meal planning'
    'test/task-names.test.ts > meal planning > grocery lists'
    // test
    'test/task-names.test.ts > meal planning > grocery lists > calculates ingredients'
    fullTestName?: string

    Full name excluding the file path, including any parent suites and this task's name. undefined for file tasks.

    Uses > as the separator between levels.

    // file
    undefined
    // suite
    'meal planning'
    'meal planning > grocery lists'
    // test
    'meal planning > grocery lists > calculates ingredients'
    id: string

    Unique task identifier. Based on the file id and the position of the task. The id of the file task is based on the file path relative to root and project name. It will not change between runs.

    `1201091390`, `1201091390_0`, `1201091390_0_1`
    
    importDurations?: Record<string, ImportDuration>

    The time spent importing every non-externalized dependency that Vitest has processed.

    location?: { column: number; line: number }

    Location of the task in the file. This field is populated only if includeTaskLocation option is set. It is generated by calling new Error and parsing the stack trace, so the location might differ depending on the runtime.

    meta: TaskMeta

    Custom metadata for the task. JSON reporter will save this data.

    mode: RunMode

    Task mode.

    • skip: task is skipped
    • only: only this task and other tasks with only mode will run
    • todo: task is marked as a todo, alias for skip
    • run: task will run or already ran
    • queued: task will start running next. It can only exist on the File
    name: string

    Task name provided by the user. If no name was provided, it will be an empty string.

    pool?: string

    The name of the pool that the file belongs to.

    'forks'
    
    projectName: string | undefined

    The name of the workspace project the file belongs to.

    repeats?: number

    The amount of times the task should be repeated after the successful run. If the task fails, it will not be retried unless retry is specified.

    0
    
    result?: TaskResult

    Result of the task. Suite and file tasks will only have the result if there was an error during collection or inside afterAll/beforeAll.

    retry?: number

    The amount of times the task should be retried if it fails.

    0
    
    setupDuration?: number

    The time it took to import the setup file.

    shuffle?: boolean

    Whether the tasks of the suite run in a random order.

    suite?: Suite

    Suite that this task is part of. File task or the global suite will have no parent.

    tasks: Task[]

    An array of tasks that are part of the suite.

    type: "suite"
    viteEnvironment?: string

    The environment that processes the file on the server.