Skip to content

Interface: TestRecord ​

A test, with the effective values the runner applies, including those inherited from its describes.

Properties ​

id ​

id: string

Derived from the file path, the describe titles, the title and its position among tests with the same title.


bodyHash ​

bodyHash: string | null

Hash of the test body, ignoring whitespace and comments; null when the test has no body.


suiteId ​

suiteId: string | null

The nearest describe; null outside any describe.


suitePath ​

suitePath: string[]

Titles of the describes around the test, outermost first.


relativeFilePath ​

relativeFilePath: string

Path from the project root, with / separators.


fileName ​

fileName: string


lineStart ​

lineStart: number


lineEnd ​

lineEnd: number


columnStart ​

columnStart: number

In UTF-16 code units.


columnEnd ​

columnEnd: number

In UTF-16 code units.


title ​

title: string

As the runner shows it, tags included.


titleWithoutTags ​

titleWithoutTags: string

title with @tag words removed and spaces tidied.


hasDynamicTitle ​

hasDynamicTitle: boolean

The title could not be resolved to a fixed string, so title holds its source text.


fullName ​

fullName: string

suitePath and title joined with " > ".


isTypeTest ​

isTypeTest: boolean

Declared in a Vitest type test file (*.test-d.ts, *.spec-d.ts).


state ​

state: "active" | "skip" | "fixme" | "todo" | "expectedToFail" | "notLoaded"


isActive ​

isActive: boolean


isSkipped ​

isSkipped: boolean


isFixme ​

isFixme: boolean


isTodo ​

isTodo: boolean


isExpectedToFail ​

isExpectedToFail: boolean


isNotLoaded ​

isNotLoaded: boolean

The runner refuses to load the file; a diagnostic at stateLine says why.


isOnly ​

isOnly: boolean

The test or a describe around it uses .only.


isConditional ​

isConditional: boolean

The state applies only when a condition holds, as with test.skip(condition) or skipIf.


condition ​

condition: string | null

Source text of the condition, shortened when long; null when unconditional.


reason ​

reason: string | null


hasDynamicReason ​

hasDynamicReason: boolean

The reason could not be worked out to a string, so reason holds its source text.


stateSource ​

stateSource: "test" | "suite" | "file" | null

null for active tests.


stateLine ​

stateLine: number | null

The line that sets the state; null for active tests.


isParallel ​

isParallel: boolean

Both isParallel and isSerial false means the framework's default mode.


isSerial ​

isSerial: boolean


tags ​

tags: string[]

From the test and every describe around it, outermost first, without duplicates.


annotations ​

annotations: object[]

type ​

type: string

description ​

description: string | null

lineStart ​

lineStart: number


comments ​

comments: string[]

Comment lines directly above the test. By default only filled for tests that are not active.


locks ​

locks: string[]

From the test, its describes and the test.describe.configure() calls around it. Playwright only.


meta ​

meta: Record<string, MetaValue> | null

Merged from the describes and the test. Vitest only; literal values only.


isParameterized ​

isParameterized: boolean

Declared with .each or .for, or inside a describe declared with them, so the runner repeats it.


caseCount ​

caseCount: number | null

How many times the runner repeats the test: the cases of its own table times those of each describe table around it. Null when a table is not written out in the file, or the test is not parameterized.


isInLoop ​

isInLoop: boolean

Declared inside a loop, forEach or map.


isInCondition ​

isInCondition: boolean

Declared inside if, ?:, && or switch.


isInFunction ​

isInFunction: boolean

Declared inside a plain function.