-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Describe the bug
When I want to run vitest in headless mode via the CLI npx vitest --browser.headless I get the following error: Error: Vitest Browser Mode requires "browser.name" (deprecated) or "browser.instances" options, none were set..
This used to work with v2 and the deprecated browser.name in my workspace config.
Reproduction
I have a vitest workspace defined like this:
export default defineWorkspace([
{
test: {
include: [
"packages/*/test/unit/**/*.test.{ts,tsx}",
"packages/*/test/types/**/*.test-d.{ts,tsx}",
],
name: "node",
environment: "node",
typecheck: {
enabled: true,
tsconfig: "./tsconfig.json",
},
},
},
{
test: {
include: ["packages/*/test/browser/**/*.test.{ts,tsx}"],
name: "browser",
browser: {
enabled: true,
provider: "playwright",
instances: [
{
browser: "chromium",
},
],
},
},
},
]);Run npx vitest --browser.headless
System Info
Used Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Type
Projects
Status
Approved