···14141515You can provide your own pool by specifying a file path:
16161717-```ts
1717+```ts [vitest.config.ts]
1818import { defineConfig } from 'vitest/config'
19192020export default defineConfig({
···2727 customProperty: true,
2828 },
2929 },
3030- // you can also specify pool for a subset of files
3131- poolMatchGlobs: [
3232- ['**/*.custom.test.ts', './my-custom-pool.ts'],
3030+ },
3131+})
3232+```
3333+3434+If you need to run tests in different pools, use the [workspace](/guide/workspace) feature:
3535+3636+```ts [vitest.config.ts]
3737+export default defineConfig({
3838+ test: {
3939+ workspace: [
4040+ {
4141+ extends: true,
4242+ test: {
4343+ pool: 'threads',
4444+ },
4545+ },
3346 ],
3447 },
3548})
3649```
5050+5151+::: info
5252+The `workspace` field was introduced in Vitest 2.2. To define a workspace in Vitest <2.2, create a separate `vitest.workspace.ts` file.
5353+:::
37543855## API
3956
+45-1
docs/config/index.md
···581581- **Type:** `[string, EnvironmentName][]`
582582- **Default:** `[]`
583583584584+::: warning
585585+This API was deprecated in Vitest 2.2. Use [workspace](/guide/workspace) to define different configurations instead.
586586+587587+```ts
588588+export default defineConfig({
589589+ test: {
590590+ environmentMatchGlobs: [ // [!code --]
591591+ ['./*.jsdom.test.ts', 'jsdom'], // [!code --]
592592+ ], // [!code --]
593593+ workspace: [ // [!code ++]
594594+ { // [!code ++]
595595+ extends: true, // [!code ++]
596596+ test: { // [!code ++]
597597+ environment: 'jsdom', // [!code ++]
598598+ }, // [!code ++]
599599+ }, // [!code ++]
600600+ ], // [!code ++]
601601+ },
602602+})
603603+```
604604+:::
605605+584606Automatically assign environment based on globs. The first match will be used.
585607586608For example:
···605627606628- **Type:** `[string, 'threads' | 'forks' | 'vmThreads' | 'vmForks' | 'typescript'][]`
607629- **Default:** `[]`
630630+631631+::: warning
632632+This API was deprecated in Vitest 2.2. Use [workspace](/guide/workspace) to define different configurations instead:
633633+634634+```ts
635635+export default defineConfig({
636636+ test: {
637637+ poolMatchGlobs: [ // [!code --]
638638+ ['./*.threads.test.ts', 'threads'], // [!code --]
639639+ ], // [!code --]
640640+ workspace: [ // [!code ++]
641641+ { // [!code ++]
642642+ test: { // [!code ++]
643643+ extends: true, // [!code ++]
644644+ pool: 'threads', // [!code ++]
645645+ }, // [!code ++]
646646+ }, // [!code ++]
647647+ ], // [!code ++]
648648+ },
649649+})
650650+```
651651+:::
608652609653Automatically assign pool in which tests will run based on globs. The first match will be used.
610654···17131757- **Default:** `false`
17141758- **CLI:** `--browser`, `--browser.enabled=false`
1715175917161716-Run all tests inside a browser by default. Can be overridden with [`poolMatchGlobs`](#poolmatchglobs) option.
17601760+Run all tests inside a browser by default.
1717176117181762#### browser.name
17191763
+1-1
docs/guide/improving-performance.md
···88- `forks` pool runs every test file in a separate [forked child process](https://nodejs.org/api/child_process.html#child_processforkmodulepath-args-options)
99- `vmThreads` pool runs every test file in a separate [VM context](https://nodejs.org/api/vm.html#vmcreatecontextcontextobject-options), but it uses workers for parallelism
10101111-This greatly increases test times, which might not be desirable for projects that don't rely on side effects and properly cleanup their state (which is usually true for projects with `node` environment). In this case disabling isolation will improve the speed of your tests. To do that, you can provide `--no-isolate` flag to the CLI or set [`test.isolate`](/config/#isolate) property in the config to `false`. If you are using several pools at once with `poolMatchGlobs`, you can also disable isolation for a specific pool you are using.
1111+This greatly increases test times, which might not be desirable for projects that don't rely on side effects and properly cleanup their state (which is usually true for projects with `node` environment). In this case disabling isolation will improve the speed of your tests. To do that, you can provide `--no-isolate` flag to the CLI or set [`test.isolate`](/config/#isolate) property in the config to `false`.
12121313::: code-group
1414```bash [CLI]