[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

docs: clarify that workspace can be used to specify several configs (#6854)

authored by

Vladimir and committed by
GitHub
(Nov 5, 2024, 10:57 AM +0100) a2175c7d 68be7b13

+3 -3
+3 -3
docs/guide/workspace.md
··· 10 10 11 11 ::: 12 12 13 - Vitest provides built-in support for monorepos through a workspace configuration file. You can create a workspace to define your project's setups. 13 + Vitest provides a way to define multiple project configurations within a single Vitest process. This feature is particularly useful for monorepo setups but can also be used to run tests with different configurations, such as `resolve.alias`, `plugins`, or `test.browser` and more. 14 14 15 15 ## Defining a Workspace 16 16 17 - A workspace must include a `vitest.workspace` or `vitest.projects` file in its root directory (located in the same folder as your root configuration file, if applicable). Vitest supports `ts`, `js`, and `json` extensions for this file. 17 + A workspace must include a `vitest.workspace` or `vitest.projects` file in its root directory (located in the same folder as your root configuration file or working directory if it doesn't exist). Vitest supports `ts`, `js`, and `json` extensions for this file. 18 18 19 19 ::: tip NAMING 20 20 Please note that this feature is named `workspace`, not `workspaces` (without an "s" at the end). ··· 80 80 ::: 81 81 82 82 ::: warning 83 - All projects must have unique names; otherwise, Vitest will throw an error. If a name is not provided in the inline configuration, Vitest will assign a number. For project configurations defined with glob syntax, Vitest will default to using the "name" property in the nearest `package.json` file or the folder name if no such file exists. 83 + All projects must have unique names; otherwise, Vitest will throw an error. If a name is not provided in the inline configuration, Vitest will assign a number. For project configurations defined with glob syntax, Vitest will default to using the "name" property in the nearest `package.json` file or, if none exists, the folder name. 84 84 ::: 85 85 86 86 If you do not use inline configurations, you can create a small JSON file in your root directory: