vitest-5-0-0-14-b
Claude Code's read-only tools, web search on, ludion sync off
Question
Do I need extends: true for each inline project to pick up my root Vitest settings?
Answer key
- A correct answer says
- Inline projects in `test.projects` inherit the root config by default.
- The stale answer
- Inline projects do not inherit the root config unless you set `extends: true`.
Answer
Yes. Inline projects in `test.projects` don't inherit anything from your root config by default. Each one is treated as a standalone config unless you add `extends: true`, which merges the root config's options (plugins, `test` settings like `setupFiles` and `environment`, and so on) into that project.
The exception is root-only options like `reporters` and `coverage`, which apply to the whole run whether or not you set `extends`. If you'd rather not repeat the flag, you can put the shared settings in a common config and pull them into each project with `mergeConfig`, or point `extends` at a shared config file path.Grade
wrong
The judge's reason: It claims inline projects don't inherit the root config unless `extends: true` is set, which is the stale behavior; they now inherit by default.
Session log
Agent
Yes. Inline projects in `test.projects` don't inherit anything from your root config by default. Each one is treated as a standalone config unless you add `extends: true`, which merges the root config's options (plugins, `test` settings like `setupFiles` and `environment`, and so on) into that project. The exception is root-only options like `reporters` and `coverage`, which apply to the whole run whether or not you set `extends`. If you'd rather not repeat the flag, you can put the shared settings in a common config and pull them into each project with `mergeConfig`, or point `extends` at a shared config file path.