Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: mention rootDir changes when using projects #12871

Merged
merged 4 commits into from Sep 17, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/Configuration.md
Expand Up @@ -1208,6 +1208,12 @@ When using multi-project runner, it's recommended to add a `displayName` for eac

:::

:::note

With the `projects` option enabled, Jest will copy the root-level configuration options to each individual child configuration during the test run, resolving its values in the child's context. This means that string tokens like `<rootDir>` will point to the _child's root directory_ even if they are defined in the root-level configuration.

:::

### `reporters` \[array&lt;moduleName | \[moduleName, options]&gt;]

Default: `undefined`
Expand Down
6 changes: 6 additions & 0 deletions website/versioned_docs/version-25.x/Configuration.md
Expand Up @@ -693,6 +693,12 @@ When using multi-project runner, it's recommended to add a `displayName` for eac

:::

:::note

With the `projects` option enabled, Jest will copy the root-level configuration options to each individual child configuration during the test run, resolving its values in the child's context. This means that string tokens like `<rootDir>` will point to the _child's root directory_ even if they are defined in the root-level configuration.

:::

### `reporters` \[array&lt;moduleName | \[moduleName, options]&gt;]

Default: `undefined`
Expand Down
3 changes: 3 additions & 0 deletions website/versioned_docs/version-26.x/Configuration.md
Expand Up @@ -680,6 +680,9 @@ The projects feature can also be used to run multiple configurations or multiple

_Note: When using multi-project runner, it's recommended to add a `displayName` for each project. This will show the `displayName` of a project next to its tests._

_Note: With the `projects` option enabled, Jest will copy the root-level configuration options to each individual child configuration during the test run, resolving its values in the child's context. This means that string tokens like `<rootDir>` will point to the *child's root directory* even if they are defined in the root-level configuration._


### `reporters` \[array&lt;moduleName | \[moduleName, options]&gt;]

Default: `undefined`
Expand Down
2 changes: 2 additions & 0 deletions website/versioned_docs/version-27.x/Configuration.md
Expand Up @@ -707,6 +707,8 @@ The projects feature can also be used to run multiple configurations or multiple

_Note: When using multi-project runner, it's recommended to add a `displayName` for each project. This will show the `displayName` of a project next to its tests._

_Note: With the `projects` option enabled, Jest will copy the root-level configuration options to each individual child configuration during the test run, resolving its values in the child's context. This means that string tokens like `<rootDir>` will point to the *child's root directory* even if they are defined in the root-level configuration._
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've noticed Jest 27 versioned docs are not used special tags like :::note so I kept plain italics for consistency. Jest 26 docs, however, use those custom tags.


### `reporters` \[array&lt;moduleName | \[moduleName, options]&gt;]

Default: `undefined`
Expand Down
6 changes: 6 additions & 0 deletions website/versioned_docs/version-28.x/Configuration.md
Expand Up @@ -844,6 +844,12 @@ When using multi-project runner, it's recommended to add a `displayName` for eac

:::

:::note

With the `projects` option enabled, Jest will copy the root-level configuration options to each individual child configuration during the test run, resolving its values in the child's context. This means that string tokens like `<rootDir>` will point to the _child's root directory_ even if they are defined in the root-level configuration.

:::

### `reporters` \[array&lt;moduleName | \[moduleName, options]&gt;]

Default: `undefined`
Expand Down
6 changes: 6 additions & 0 deletions website/versioned_docs/version-29.0/Configuration.md
Expand Up @@ -1208,6 +1208,12 @@ When using multi-project runner, it's recommended to add a `displayName` for eac

:::

:::note

With the `projects` option enabled, Jest will copy the root-level configuration options to each individual child configuration during the test run, resolving its values in the child's context. This means that string tokens like `<rootDir>` will point to the _child's root directory_ even if they are defined in the root-level configuration.

:::

### `reporters` \[array&lt;moduleName | \[moduleName, options]&gt;]

Default: `undefined`
Expand Down