Optionaloptions: InitializeProjectOptionsOptionaltmpDir: stringOptionalbrowserReadonlyglobalResolved global configuration. If there are no workspace projects, this will be the same as config.
OptionaloptionsProvide a value to the test context. This value will be available to all tests with inject.
ReadonlytmpTemporary directory for the project. This is unique for each project. Vitest stores transformed content here.
ReadonlyvitestThe global Vitest instance.
The color used when reporting tasks of this project.
Resolved project configuration.
The unique hash of this project. This value is consistent between the reruns.
It is based on the root of the project (not consistent between OS) and its name.
The name of the project or an empty string if not set.
Serialized project configuration. This is the config that tests receive.
Vite's dev server instance. Every workspace project has its own server.
Closes the project and all associated resources. This can only be called once; the closing promise is cached until the server restarts. If the resources are needed again, create a new project.
Creates a new test specification. Specifications describe how to run tests.
The file path
Optionallocations: number[]Optionalpool: stringGet the provided context. The project context is merged with the global context.
Get all files in the project that match the globs in the config and the filters.
Optionalfilters: string[]String filters to match the test files.
Check if this is the root project. The root project is the one that has the root config.
Test if a file matches the test globs. This does the actual glob matching if the test is not cached, unlike isCachedTestFile.
Optionalsource: () => string
Browser instance if the browser is enabled. This is initialized when the tests run for the first time.