Skip to content

Commit

Permalink
docs: add two more admonitions to Configuration.md (#12847)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrazauskas committed May 15, 2022
1 parent 379f6de commit 39bad8c
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 25 deletions.
22 changes: 18 additions & 4 deletions docs/Configuration.md
Expand Up @@ -160,7 +160,7 @@ Indicates whether the coverage information should be collected while executing t

Jest ships with two coverage providers: `babel` (default) and `v8`. See the [`coverageProvider`](#coverageprovider-string) option for more details.

:::note
:::info

The `babel` and `v8` coverage providers use `/* istanbul ignore next */` and `/* c8 ignore next */` comments to exclude lines from coverage reports, respectively. For more information, you can view the [`istanbuljs` documentation](https://github.com/istanbuljs/nyc#parsing-hints-ignoring-lines) and the [`c8` documentation](https://github.com/bcoe/c8#ignoring-uncovered-lines-functions-and-blocks).

Expand Down Expand Up @@ -742,9 +742,19 @@ An alternative API to setting the `NODE_PATH` env variable, `modulePaths` is an

Default: `false`

Activates notifications for test results.
Activates native OS notifications for test results. To display the notifications Jest needs [`node-notifier`](https://github.com/mikaelbr/node-notifier) package, which must be installed additionally:

```bash npm2yarn
npm install --save-dev node-notifier
```

:::tip

On macOS, remember to allow notifications from `terminal-notifier` under System Preferences > Notifications & Focus.

**Beware:** Jest uses [node-notifier](https://github.com/mikaelbr/node-notifier) to display desktop notifications. On Windows, it creates a new start menu entry on the first use and not display the notification. Notifications will be properly displayed on subsequent runs
On Windows, `node-notifier` creates a new start menu entry on the first use and not display the notification. Notifications will be properly displayed on subsequent runs.

:::

### `notifyMode` \[string]

Expand Down Expand Up @@ -1018,7 +1028,11 @@ The root directory that Jest should scan for tests and modules within. If you pu

Oftentimes, you'll want to set this to `'src'` or `'lib'`, corresponding to where in your repository the code is stored.

_Note that using `'<rootDir>'` as a string token in any other path-based config settings will refer back to this value. So, for example, if you want your [`setupFiles`](#setupfiles-array) config entry to point at the `env-setup.js` file at the root of your project, you could set its value to `["<rootDir>/env-setup.js"]`._
:::tip

Using `'<rootDir>'` as a string token in any other path-based configuration settings will refer back to this value. For example, if you want a [`setupFiles`](#setupfiles-array) entry to point at the `some-setup.js` file at the root of the project, set its value to: `'<rootDir>/some-setup.js'`.

:::

### `roots` \[array&lt;string&gt;]

Expand Down
20 changes: 15 additions & 5 deletions website/versioned_docs/version-25.x/Configuration.md
Expand Up @@ -143,7 +143,7 @@ Indicates whether the coverage information should be collected while executing t

Jest ships with two coverage providers: `babel` (default) and `v8`. See the [`coverageProvider`](#coverageprovider-string) option for more details.

:::note
:::info

The `babel` and `v8` coverage providers use `/* istanbul ignore next */` and `/* c8 ignore next */` comments to exclude lines from coverage reports, respectively. For more information, you can view the [`istanbuljs` documentation](https://github.com/istanbuljs/nyc#parsing-hints-ignoring-lines) and the [`c8` documentation](https://github.com/bcoe/c8#ignoring-uncovered-lines-functions-and-blocks).

Expand Down Expand Up @@ -599,9 +599,19 @@ An alternative API to setting the `NODE_PATH` env variable, `modulePaths` is an

Default: `false`

Activates notifications for test results.
Activates native OS notifications for test results. To display the notifications Jest needs [`node-notifier`](https://github.com/mikaelbr/node-notifier) package, which must be installed additionally:

```bash npm2yarn
npm install --save-dev node-notifier
```

:::tip

On macOS, remember to allow notifications from `terminal-notifier` under System Preferences > Notifications & Focus.

On Windows, `node-notifier` creates a new start menu entry on the first use and not display the notification. Notifications will be properly displayed on subsequent runs.

**Beware:** Jest uses [node-notifier](https://github.com/mikaelbr/node-notifier) to display desktop notifications. On Windows, it creates a new start menu entry on the first use and not display the notification. Notifications will be properly displayed on subsequent runs
:::

### `notifyMode` \[string]

Expand Down Expand Up @@ -803,9 +813,9 @@ The root directory that Jest should scan for tests and modules within. If you pu

Oftentimes, you'll want to set this to `'src'` or `'lib'`, corresponding to where in your repository the code is stored.

:::note
:::tip

Using `'<rootDir>'` as a string token in any other path-based config settings will refer back to this value. So, for example, if you want your [`setupFiles`](#setupfiles-array) config entry to point at the `env-setup.js` file at the root of your project, you could set its value to `["<rootDir>/env-setup.js"]`.
Using `'<rootDir>'` as a string token in any other path-based configuration settings will refer back to this value. For example, if you want a [`setupFiles`](#setupfiles-array) entry to point at the `some-setup.js` file at the root of the project, set its value to: `'<rootDir>/some-setup.js'`.

:::

Expand Down
22 changes: 18 additions & 4 deletions website/versioned_docs/version-26.x/Configuration.md
Expand Up @@ -156,7 +156,7 @@ Indicates whether the coverage information should be collected while executing t

Jest ships with two coverage providers: `babel` (default) and `v8`. See the [`coverageProvider`](#coverageprovider-string) option for more details.

:::note
:::info

The `babel` and `v8` coverage providers use `/* istanbul ignore next */` and `/* c8 ignore next */` comments to exclude lines from coverage reports, respectively. For more information, you can view the [`istanbuljs` documentation](https://github.com/istanbuljs/nyc#parsing-hints-ignoring-lines) and the [`c8` documentation](https://github.com/bcoe/c8#ignoring-uncovered-lines-functions-and-blocks).

Expand Down Expand Up @@ -590,9 +590,19 @@ An alternative API to setting the `NODE_PATH` env variable, `modulePaths` is an

Default: `false`

Activates notifications for test results.
Activates native OS notifications for test results. To display the notifications Jest needs [`node-notifier`](https://github.com/mikaelbr/node-notifier) package, which must be installed additionally:

**Beware:** Jest uses [node-notifier](https://github.com/mikaelbr/node-notifier) to display desktop notifications. On Windows, it creates a new start menu entry on the first use and not display the notification. Notifications will be properly displayed on subsequent runs
```bash npm2yarn
npm install --save-dev node-notifier
```

:::tip

On macOS, remember to allow notifications from `terminal-notifier` under System Preferences > Notifications & Focus.

On Windows, `node-notifier` creates a new start menu entry on the first use and not display the notification. Notifications will be properly displayed on subsequent runs.

:::

### `notifyMode` \[string]

Expand Down Expand Up @@ -837,7 +847,11 @@ The root directory that Jest should scan for tests and modules within. If you pu

Oftentimes, you'll want to set this to `'src'` or `'lib'`, corresponding to where in your repository the code is stored.

_Note that using `'<rootDir>'` as a string token in any other path-based config settings will refer back to this value. So, for example, if you want your [`setupFiles`](#setupfiles-array) config entry to point at the `env-setup.js` file at the root of your project, you could set its value to `["<rootDir>/env-setup.js"]`._
:::tip

Using `'<rootDir>'` as a string token in any other path-based configuration settings will refer back to this value. For example, if you want a [`setupFiles`](#setupfiles-array) entry to point at the `some-setup.js` file at the root of the project, set its value to: `'<rootDir>/some-setup.js'`.

:::

### `roots` \[array&lt;string&gt;]

Expand Down
22 changes: 18 additions & 4 deletions website/versioned_docs/version-27.x/Configuration.md
Expand Up @@ -156,7 +156,7 @@ Indicates whether the coverage information should be collected while executing t

Jest ships with two coverage providers: `babel` (default) and `v8`. See the [`coverageProvider`](#coverageprovider-string) option for more details.

:::note
:::info

The `babel` and `v8` coverage providers use `/* istanbul ignore next */` and `/* c8 ignore next */` comments to exclude lines from coverage reports, respectively. For more information, you can view the [`istanbuljs` documentation](https://github.com/istanbuljs/nyc#parsing-hints-ignoring-lines) and the [`c8` documentation](https://github.com/bcoe/c8#ignoring-uncovered-lines-functions-and-blocks).

Expand Down Expand Up @@ -617,9 +617,19 @@ An alternative API to setting the `NODE_PATH` env variable, `modulePaths` is an

Default: `false`

Activates notifications for test results.
Activates native OS notifications for test results. To display the notifications Jest needs [`node-notifier`](https://github.com/mikaelbr/node-notifier) package, which must be installed additionally:

**Beware:** Jest uses [node-notifier](https://github.com/mikaelbr/node-notifier) to display desktop notifications. On Windows, it creates a new start menu entry on the first use and not display the notification. Notifications will be properly displayed on subsequent runs
```bash npm2yarn
npm install --save-dev node-notifier
```

:::tip

On macOS, remember to allow notifications from `terminal-notifier` under System Preferences > Notifications & Focus.

On Windows, `node-notifier` creates a new start menu entry on the first use and not display the notification. Notifications will be properly displayed on subsequent runs.

:::

### `notifyMode` \[string]

Expand Down Expand Up @@ -868,7 +878,11 @@ The root directory that Jest should scan for tests and modules within. If you pu

Oftentimes, you'll want to set this to `'src'` or `'lib'`, corresponding to where in your repository the code is stored.

_Note that using `'<rootDir>'` as a string token in any other path-based config settings will refer back to this value. So, for example, if you want your [`setupFiles`](#setupfiles-array) config entry to point at the `env-setup.js` file at the root of your project, you could set its value to `["<rootDir>/env-setup.js"]`._
:::tip

Using `'<rootDir>'` as a string token in any other path-based configuration settings will refer back to this value. For example, if you want a [`setupFiles`](#setupfiles-array) entry to point at the `some-setup.js` file at the root of the project, set its value to: `'<rootDir>/some-setup.js'`.

:::

### `roots` \[array&lt;string&gt;]

Expand Down
22 changes: 18 additions & 4 deletions website/versioned_docs/version-28.0/Configuration.md
Expand Up @@ -160,7 +160,7 @@ Indicates whether the coverage information should be collected while executing t

Jest ships with two coverage providers: `babel` (default) and `v8`. See the [`coverageProvider`](#coverageprovider-string) option for more details.

:::note
:::info

The `babel` and `v8` coverage providers use `/* istanbul ignore next */` and `/* c8 ignore next */` comments to exclude lines from coverage reports, respectively. For more information, you can view the [`istanbuljs` documentation](https://github.com/istanbuljs/nyc#parsing-hints-ignoring-lines) and the [`c8` documentation](https://github.com/bcoe/c8#ignoring-uncovered-lines-functions-and-blocks).

Expand Down Expand Up @@ -742,9 +742,19 @@ An alternative API to setting the `NODE_PATH` env variable, `modulePaths` is an

Default: `false`

Activates notifications for test results.
Activates native OS notifications for test results. To display the notifications Jest needs [`node-notifier`](https://github.com/mikaelbr/node-notifier) package, which must be installed additionally:

```bash npm2yarn
npm install --save-dev node-notifier
```

:::tip

On macOS, remember to allow notifications from `terminal-notifier` under System Preferences > Notifications & Focus.

**Beware:** Jest uses [node-notifier](https://github.com/mikaelbr/node-notifier) to display desktop notifications. On Windows, it creates a new start menu entry on the first use and not display the notification. Notifications will be properly displayed on subsequent runs
On Windows, `node-notifier` creates a new start menu entry on the first use and not display the notification. Notifications will be properly displayed on subsequent runs.

:::

### `notifyMode` \[string]

Expand Down Expand Up @@ -1018,7 +1028,11 @@ The root directory that Jest should scan for tests and modules within. If you pu

Oftentimes, you'll want to set this to `'src'` or `'lib'`, corresponding to where in your repository the code is stored.

_Note that using `'<rootDir>'` as a string token in any other path-based config settings will refer back to this value. So, for example, if you want your [`setupFiles`](#setupfiles-array) config entry to point at the `env-setup.js` file at the root of your project, you could set its value to `["<rootDir>/env-setup.js"]`._
:::tip

Using `'<rootDir>'` as a string token in any other path-based configuration settings will refer back to this value. For example, if you want a [`setupFiles`](#setupfiles-array) entry to point at the `some-setup.js` file at the root of the project, set its value to: `'<rootDir>/some-setup.js'`.

:::

### `roots` \[array&lt;string&gt;]

Expand Down
22 changes: 18 additions & 4 deletions website/versioned_docs/version-28.1/Configuration.md
Expand Up @@ -160,7 +160,7 @@ Indicates whether the coverage information should be collected while executing t

Jest ships with two coverage providers: `babel` (default) and `v8`. See the [`coverageProvider`](#coverageprovider-string) option for more details.

:::note
:::info

The `babel` and `v8` coverage providers use `/* istanbul ignore next */` and `/* c8 ignore next */` comments to exclude lines from coverage reports, respectively. For more information, you can view the [`istanbuljs` documentation](https://github.com/istanbuljs/nyc#parsing-hints-ignoring-lines) and the [`c8` documentation](https://github.com/bcoe/c8#ignoring-uncovered-lines-functions-and-blocks).

Expand Down Expand Up @@ -742,9 +742,19 @@ An alternative API to setting the `NODE_PATH` env variable, `modulePaths` is an

Default: `false`

Activates notifications for test results.
Activates native OS notifications for test results. To display the notifications Jest needs [`node-notifier`](https://github.com/mikaelbr/node-notifier) package, which must be installed additionally:

```bash npm2yarn
npm install --save-dev node-notifier
```

:::tip

On macOS, remember to allow notifications from `terminal-notifier` under System Preferences > Notifications & Focus.

**Beware:** Jest uses [node-notifier](https://github.com/mikaelbr/node-notifier) to display desktop notifications. On Windows, it creates a new start menu entry on the first use and not display the notification. Notifications will be properly displayed on subsequent runs
On Windows, `node-notifier` creates a new start menu entry on the first use and not display the notification. Notifications will be properly displayed on subsequent runs.

:::

### `notifyMode` \[string]

Expand Down Expand Up @@ -1018,7 +1028,11 @@ The root directory that Jest should scan for tests and modules within. If you pu

Oftentimes, you'll want to set this to `'src'` or `'lib'`, corresponding to where in your repository the code is stored.

_Note that using `'<rootDir>'` as a string token in any other path-based config settings will refer back to this value. So, for example, if you want your [`setupFiles`](#setupfiles-array) config entry to point at the `env-setup.js` file at the root of your project, you could set its value to `["<rootDir>/env-setup.js"]`._
:::tip

Using `'<rootDir>'` as a string token in any other path-based configuration settings will refer back to this value. For example, if you want a [`setupFiles`](#setupfiles-array) entry to point at the `some-setup.js` file at the root of the project, set its value to: `'<rootDir>/some-setup.js'`.

:::

### `roots` \[array&lt;string&gt;]

Expand Down

0 comments on commit 39bad8c

Please sign in to comment.