···4242})
4343```
44444545-Vitest will treat every folder in `packages` as a separate project even if it doesn't have a config file inside. If the glob pattern matches a file, it will validate that the name starts with `vitest.config`/`vite.config` or matches `(vite|vitest).*.config.*` pattern to ensure it's a Vitest configuration file. For example, these config files are valid:
4545+Vitest will treat every folder in `packages` as a separate project even if it doesn't have a config file inside. If a project entry resolves to a file (either from a glob pattern or a direct file path), Vitest will validate that the name either:
4646+4747+- starts with `vitest.config` or `vite.config` (for example, `vitest.config.unit.ts`)
4848+- or matches `vitest.<name>.config.*` / `vite.<name>.config.*`, where `<name>` can contain letters, numbers, `_`, and `-`
4949+5050+For example, these config files are valid:
46514752- `vitest.config.ts`
4853- `vite.config.js`
4954- `vitest.unit.config.ts`
5555+- `vitest.e2e-node.config.ts`
5056- `vite.e2e.config.js`
5157- `vitest.config.unit.js`
5258- `vite.config.e2e.js`
+28
test/cli/test/projects.test.ts
···181181 expect(exitCode).toBe(0)
182182 })
183183184184+ it('[glob] the name has "unit-test" (with hyphen) between "vitest" and "config" and works', async () => {
185185+ const { exitCode } = await runInlineTests({
186186+ 'vitest.unit-test.config.js': {},
187187+ 'vitest.config.js': {
188188+ test: {
189189+ passWithNoTests: true,
190190+ projects: ['./vitest.*.config.js'],
191191+ },
192192+ },
193193+ })
194194+195195+ expect(exitCode).toBe(0)
196196+ })
197197+198198+ it('[file] the name has "unit-test" (with hyphen) between "vitest" and "config" and works', async () => {
199199+ const { exitCode } = await runInlineTests({
200200+ 'vitest.unit-test.config.js': {},
201201+ 'vitest.config.js': {
202202+ test: {
203203+ passWithNoTests: true,
204204+ projects: ['./vitest.unit-test.config.js'],
205205+ },
206206+ },
207207+ })
208208+209209+ expect(exitCode).toBe(0)
210210+ })
211211+184212 it('[file] the name does not start with "vite"/"vitest" and throws an error', async () => {
185213 const { stderr } = await runInlineTests({
186214 'unit.config.js': {},