> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# projects

- **Type:**

```ts
type ProjectConfig = Omit<
  RstestConfig,
  'projects' | 'reporters' | 'pool' | 'isolate' | 'coverage' | 'bail'
>;

type Projects = (string | ProjectConfig)[];
```

- **Default:** `[<rootDir>]`

Define multiple test projects. It can be an array of directories, configuration files, or glob patterns, or an object.

Rstest will run the tests for each project according to the configuration defined in each project, and the test results from all projects will be combined and displayed.

```ts name='rstest.config.ts'
import { defineConfig, defineInlineProject } from '@rstest/core';

export default defineConfig({
  projects: [
    // A monorepo: each package directory is a project
    'packages/*',

    // All projects under the apps directory that provide an rstest config file
    'apps/**/rstest.config.ts',

    // A specific project directory
    '<rootDir>/services/auth',

    // A specific project's config file
    './projects/web/rstest.config.ts',

    // inline project configs
    defineInlineProject({
      name: 'node',
      include: ['tests/node/**/*.{test,spec}.{js,cjs,mjs,ts,tsx}'],
    }),
    defineInlineProject({
      name: 'react',
      include: ['tests/react/**/*.{test,spec}.{js,cjs,mjs,ts,tsx}'],
      testEnvironment: 'jsdom',
    }),
  ],
});
```

Use `defineInlineProject()` for object items in any `projects` array, including nested `projects`. Use `defineProject()` only for the top-level export of a project config file.

`defineProject()` can omit `name` on the exported project and let Rstest infer it using the [name](/config/test/name.md) option rules. `defineInlineProject()` requires `name` for each inline project item.

More information about projects can be found in [Test projects](/guide/basic/projects.md).
