property TestResult.file

Source file this test was declared in, relative to the project root, or null.

Populated for failures only, and that is a limit of what QUnit reports rather than a choice: testEnd carries no file, so the path is recovered from the failing assertion's stack through the bundle's source map. A passing test leaves no stack to map.

Type

string | null

Usage

import { type TestResult } from "lib/api/test.ts";