Skip to content

Commit

Permalink
Add environment variables docs page (#10630)
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis authored Oct 14, 2020
1 parent e617969 commit d077f2e
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 6 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

### Features

- `[docs]` Add step for fetching `backers.json` file in website setup docs ([#10631](https://github.com/facebook/jest/pull/10631))
- `[jest-cli, jest-config]` Add support for the `jest.config.ts` configuration file ([#10564](https://github.com/facebook/jest/pull/10564))

### Fixes
Expand All @@ -11,6 +10,9 @@

### Chore & Maintenance

- `[docs]` Add step for fetching `backers.json` file in website setup docs ([#10631](https://github.com/facebook/jest/pull/10631))
- `[docs]` Add page detailing environment variables set by Jest ([#10630](https://github.com/facebook/jest/pull/10630))

### Performance

## 26.5.3
Expand Down
14 changes: 14 additions & 0 deletions docs/EnvironmentVariables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
id: environment-variables
title: Environment Variables
---

Jest sets the following environment variables:

### `NODE_ENV`

Set to `'test'` if it's not already set to something else.

### `JEST_WORKER_ID`

Each worker process is assigned a unique id (index-based that starts with `1`). This is set to `1` for all tests when [`runInBand`](CLI.md#--runinband) is set to true.
3 changes: 2 additions & 1 deletion website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"mock-function-api",
"jest-object",
"configuration",
"cli"
"cli",
"environment-variables"
]
}
}
15 changes: 15 additions & 0 deletions website/versioned_docs/version-22.x/EnvironmentVariables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
id: version-22.x-environment-variables
title: Environment Variables
original_id: environment-variables
---

Jest sets the following environment variables:

### `NODE_ENV`

Set to `'test'` if it's not already set to something else.

### `JEST_WORKER_ID`

Each worker process is assigned a unique id (index-based that starts with `1`). This is set to `1` for all tests when [`runInBand`](CLI.md#--runinband) is set to true.
3 changes: 2 additions & 1 deletion website/versioned_sidebars/version-22.x-sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"version-22.x-mock-function-api",
"version-22.x-jest-object",
"version-22.x-configuration",
"version-22.x-cli"
"version-22.x-cli",
"version-22.x-environment-variables"
]
}
}
3 changes: 2 additions & 1 deletion website/versioned_sidebars/version-23.x-sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"version-23.x-mock-function-api",
"version-23.x-jest-object",
"version-23.x-configuration",
"version-23.x-cli"
"version-23.x-cli",
"version-23.x-environment-variables"
]
}
}
3 changes: 2 additions & 1 deletion website/versioned_sidebars/version-24.x-sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"version-24.x-mock-function-api",
"version-24.x-jest-object",
"version-24.x-configuration",
"version-24.x-cli"
"version-24.x-cli",
"version-24.x-environment-variables"
]
}
}
3 changes: 2 additions & 1 deletion website/versioned_sidebars/version-26.0-sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"version-26.0-mock-function-api",
"version-26.0-jest-object",
"version-26.0-configuration",
"version-26.0-cli"
"version-26.0-cli",
"version-26.0-environment-variables"
]
}
}

0 comments on commit d077f2e

Please sign in to comment.