From 5ae7c4d3ee3979b34c1b18b09338c13dea7c1de4 Mon Sep 17 00:00:00 2001 From: Artem Zakharchenko Date: Tue, 24 May 2022 11:53:24 +0200 Subject: [PATCH 1/3] docs: mention "rootDir" changes when using "projects" --- docs/Configuration.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/Configuration.md b/docs/Configuration.md index 26769132330e..14286968d2a1 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -1451,6 +1451,8 @@ When using multi-project runner, it's recommended to add a `displayName` for eac ::: +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 the `` string token will point to the _child directory_ even if it's used in the root-level configuration, which is crucial to keep in mind when constructing paths. + ### `reporters` \[array<moduleName | \[moduleName, options]>] Default: `undefined` From 77a0cd29d5061d3945f47586a00321b65cc6982e Mon Sep 17 00:00:00 2001 From: Artem Zakharchenko Date: Thu, 26 May 2022 17:12:46 +0200 Subject: [PATCH 2/3] docs(configuration): update "projects" in versioned docs --- docs/Configuration.md | 6 +++++- website/versioned_docs/version-25.x/Configuration.md | 6 ++++++ website/versioned_docs/version-26.x/Configuration.md | 3 +++ website/versioned_docs/version-27.x/Configuration.md | 2 ++ website/versioned_docs/version-28.0/Configuration.md | 6 ++++++ website/versioned_docs/version-28.1/Configuration.md | 6 ++++++ 6 files changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/Configuration.md b/docs/Configuration.md index 14286968d2a1..9e9072817c26 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -1451,7 +1451,11 @@ When using multi-project runner, it's recommended to add a `displayName` for eac ::: -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 the `` string token will point to the _child directory_ even if it's used in the root-level configuration, which is crucial to keep in mind when constructing paths. +:::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 `` will point to the _child's root directory_ even if they are defined in the root-level configuration. + +::: ### `reporters` \[array<moduleName | \[moduleName, options]>] diff --git a/website/versioned_docs/version-25.x/Configuration.md b/website/versioned_docs/version-25.x/Configuration.md index f13ea6bf026f..3992eb21724c 100644 --- a/website/versioned_docs/version-25.x/Configuration.md +++ b/website/versioned_docs/version-25.x/Configuration.md @@ -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 `` will point to the _child's root directory_ even if they are defined in the root-level configuration. + +::: + ### `reporters` \[array<moduleName | \[moduleName, options]>] Default: `undefined` diff --git a/website/versioned_docs/version-26.x/Configuration.md b/website/versioned_docs/version-26.x/Configuration.md index 13f8dd53e86e..79663a3239ef 100644 --- a/website/versioned_docs/version-26.x/Configuration.md +++ b/website/versioned_docs/version-26.x/Configuration.md @@ -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 `` will point to the *child's root directory* even if they are defined in the root-level configuration._ + + ### `reporters` \[array<moduleName | \[moduleName, options]>] Default: `undefined` diff --git a/website/versioned_docs/version-27.x/Configuration.md b/website/versioned_docs/version-27.x/Configuration.md index fea8633d90f5..e14cb4fe4a18 100644 --- a/website/versioned_docs/version-27.x/Configuration.md +++ b/website/versioned_docs/version-27.x/Configuration.md @@ -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 `` will point to the *child's root directory* even if they are defined in the root-level configuration._ + ### `reporters` \[array<moduleName | \[moduleName, options]>] Default: `undefined` diff --git a/website/versioned_docs/version-28.0/Configuration.md b/website/versioned_docs/version-28.0/Configuration.md index bee140ad87d4..370c874b1460 100644 --- a/website/versioned_docs/version-28.0/Configuration.md +++ b/website/versioned_docs/version-28.0/Configuration.md @@ -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 `` will point to the _child's root directory_ even if they are defined in the root-level configuration. + +::: + ### `reporters` \[array<moduleName | \[moduleName, options]>] Default: `undefined` diff --git a/website/versioned_docs/version-28.1/Configuration.md b/website/versioned_docs/version-28.1/Configuration.md index 6fa8810046e8..b8ec30fa468f 100644 --- a/website/versioned_docs/version-28.1/Configuration.md +++ b/website/versioned_docs/version-28.1/Configuration.md @@ -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 `` will point to the _child's root directory_ even if they are defined in the root-level configuration. + +::: + ### `reporters` \[array<moduleName | \[moduleName, options]>] Default: `undefined` From d3fe17c67f878297a3f0788d82c38a233cebe3d1 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 17 Sep 2022 10:11:06 +0200 Subject: [PATCH 3/3] prettier --- website/versioned_docs/version-26.x/Configuration.md | 1 - 1 file changed, 1 deletion(-) diff --git a/website/versioned_docs/version-26.x/Configuration.md b/website/versioned_docs/version-26.x/Configuration.md index 0a9f9da8689e..853807ce6941 100644 --- a/website/versioned_docs/version-26.x/Configuration.md +++ b/website/versioned_docs/version-26.x/Configuration.md @@ -682,7 +682,6 @@ _Note: When using multi-project runner, it's recommended to add a `displayName` _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 `` will point to the *child's root directory* even if they are defined in the root-level configuration._ - ### `reporters` \[array<moduleName | \[moduleName, options]>] Default: `undefined`