vitest-5-0-0-20-b
Claude Code's read-only tools, web search on, ludion sync off
Question
What does vitest -p do?
Answer key
- A correct answer says
- `-p` is shorthand for `--project`.
- The stale answer
- There is no short alias for --project.
Answer
`vitest -p` is short for `--project`. When your Vitest config defines several projects (formerly called a "workspace"), it runs only the project you name, for example `vitest -p frontend`. You can repeat it to pick more than one project (`-p a -p b`), use wildcards (`-p "packages/*"`), or put `!` before a name to exclude that project. I checked this against the CLI page in the Vitest docs.Grade
correct
The judge's reason: It states that `-p` is shorthand for `--project` and does not claim there is no short alias.
Session log
Tool call: ToolSearch
{ "query": "select:WebFetch", "max_results": 1 }Tool output
{"type":"tool_reference","tool_name":"WebFetch"}Tool call: WebFetch
{ "url": "https://vitest.dev/guide/cli", "prompt": "Is there any CLI option with the short alias -p? List all short aliases (single-letter flags) and what they map to." }Tool output
Yes. `-p` is the short alias for `--project <name>`, which runs a named project from the workspace feature. It can be repeated, supports wildcards, and can exclude projects with a `!` prefix. The page lists six options with single-letter aliases: - `-r` → `--root <path>`: sets the root path - `-c` → `--config <path>`: sets the config file path - `-u` → `--update [type]`: updates snapshots - `-w` → `--watch`: enables watch mode - `-t` → `--testNamePattern <pattern>`: runs tests whose full names match a regexp - `-p` → `--project <name>`: selects the project to runAgent
`vitest -p` is short for `--project`. When your Vitest config defines several projects (formerly called a "workspace"), it runs only the project you name, for example `vitest -p frontend`. You can repeat it to pick more than one project (`-p a -p b`), use wildcards (`-p "packages/*"`), or put `!` before a name to exclude that project. I checked this against the CLI page in the Vitest docs.