PfilePath
Bun

property

test.TestContext.filePath

readonly filePath: undefined | string

The absolute path of the test file that created the current test. If a test file imports additional modules that generate tests, the imported tests will return the path of the root test file.