OptionalapiOptionalcommandsCommands that will be executed on the server
via the browser import("vitest/browser").commands API.
OptionalconnectTimeout for connecting to the browser
Optionalenabledif running tests in the browser should be the default
OptionalexpectOptionalfileRun test files in parallel if provider supports this option This option only has effect in headless mode (enabled in CI by default)
Optionalheadlessenable headless mode
OptionalinstancesConfigurations for different browser setups
OptionalisolateIsolate test environment after each test
OptionallocatorsLocator options
OptionalorchestratorScripts injected into the main window.
OptionalproviderBrowser provider
OptionalscreenshotDirectory where screenshots will be saved when page.screenshot() is called If not set, all screenshots are saved to screenshots directory in the same folder as the test file. If this is set, it will be resolved relative to the project root.
OptionalscreenshotShould Vitest take screenshots if the test fails
OptionaltesterPath to the index.html file that will be used to run tests.
OptionaltraceGenerate traces that can be viewed on https://trace.playwright.dev/
This option is supported only by playwright provider.
Optionalscreenshots?: booleanWhether to capture screenshots during tracing. Screenshots are used to build a timeline preview.
Optionalsnapshots?: booleanIf this option is true tracing will
OptionaltracesDir?: stringThe directory where all traces will be stored. By default, Vitest
stores all traces in __traces__ folder close to the test file.
OptionaltrackEnables tracking uncaught errors and exceptions so they can be reported by Vitest.
If you need to hide certain errors, it is recommended to use onUnhandledError option instead.
Disabling this will completely remove all Vitest error handlers, which can help debugging with the "Pause on exceptions" checkbox turned on.
OptionaluiShow Vitest UI
OptionalviewportDefault viewport size
Serve API options.
The default port is 63315.