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 needing additional configuration for ts-jest #13418

Merged
merged 2 commits into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2173,7 +2173,7 @@ We skipped 24.2.0 because a draft was accidentally published. Please use `24.3.0

- `[jest-jasemine2]` Add dependency on jest-each ([#6308](https://github.com/facebook/jest/pull/6308))
- `[jest-each]` Move jest-each into core Jest ([#6278](https://github.com/facebook/jest/pull/6278))
- `[examples]` Update typescript example to using ts-jest ([#6260](https://github.com/facebook/jest/pull/6260))
- `[examples]` Update typescript example to using `ts-jest` ([#6260](https://github.com/facebook/jest/pull/6260))

### Fixes

Expand Down
2 changes: 2 additions & 0 deletions docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ However, there are some [caveats](https://babeljs.io/docs/en/babel-plugin-transf
npm install --save-dev ts-jest
```

In order for Jest to transpile TypeScript with `ts-jest`, you may also need to create a [configuration](https://kulshekhar.github.io/ts-jest/docs/getting-started/installation#jest-config-file) file.

#### Type definitions

There are two ways to have [Jest global APIs](GlobalAPI.md) typed for test files written in TypeScript.
Expand Down
2 changes: 2 additions & 0 deletions website/versioned_docs/version-25.x/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ However, there are some [caveats](https://babeljs.io/docs/en/babel-plugin-transf
yarn add --dev ts-jest
```

In order for Jest to transpile TypeScript with `ts-jest`, you may also need to create a [configuration](https://kulshekhar.github.io/ts-jest/docs/getting-started/installation#jest-config-file) file.

#### Type definitions

You may also want to install the [`@types/jest`](https://www.npmjs.com/package/@types/jest) module for the version of Jest you're using. This will help provide full typing when writing your tests with TypeScript.
Expand Down
2 changes: 2 additions & 0 deletions website/versioned_docs/version-26.x/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ yarn add --dev ts-jest

You may also want to install the [`@types/jest`](https://www.npmjs.com/package/@types/jest) module for the version of Jest you're using. This will help provide full typing when writing your tests with TypeScript.

In order for Jest to transpile TypeScript with `ts-jest`, you may also need to create a [configuration](https://kulshekhar.github.io/ts-jest/docs/getting-started/installation#jest-config-file) file.

:::note

For `@types/*` modules it's recommended to try to match the version of the associated module. For example, if you are using `26.4.0` of `jest` then using `26.4.x` of `@types/jest` is ideal. In general, try to match the major (`26`) and minor (`4`) version as closely as possible.
Expand Down
2 changes: 2 additions & 0 deletions website/versioned_docs/version-27.x/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ yarn add --dev ts-jest

You may also want to install the [`@types/jest`](https://www.npmjs.com/package/@types/jest) module for the version of Jest you're using. This will help provide full typing when writing your tests with TypeScript.

In order for Jest to transpile TypeScript with `ts-jest`, you may also need to create a [configuration](https://kulshekhar.github.io/ts-jest/docs/getting-started/installation#jest-config-file) file.

:::note

For `@types/*` modules it's recommended to try to match the version of the associated module. For example, if you are using `26.4.0` of `jest` then using `26.4.x` of `@types/jest` is ideal. In general, try to match the major (`26`) and minor (`4`) version as closely as possible.
Expand Down
2 changes: 2 additions & 0 deletions website/versioned_docs/version-28.x/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ However, there are some [caveats](https://babeljs.io/docs/en/babel-plugin-transf
npm install --save-dev ts-jest
```

In order for Jest to transpile TypeScript with `ts-jest`, you may also need to create a [configuration](https://kulshekhar.github.io/ts-jest/docs/getting-started/installation#jest-config-file) file.

#### Type definitions

You may also want to install the [`@types/jest`](https://www.npmjs.com/package/@types/jest) module for the version of Jest you're using. This will help provide full typing when writing your tests with TypeScript.
Expand Down
2 changes: 2 additions & 0 deletions website/versioned_docs/version-29.0/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ However, there are some [caveats](https://babeljs.io/docs/en/babel-plugin-transf
npm install --save-dev ts-jest
```

In order for Jest to transpile TypeScript with `ts-jest`, you may also need to create a [configuration](https://kulshekhar.github.io/ts-jest/docs/getting-started/installation#jest-config-file) file.

#### Type definitions

There are two ways to have [Jest global APIs](GlobalAPI.md) typed for test files written in TypeScript.
Expand Down
2 changes: 2 additions & 0 deletions website/versioned_docs/version-29.1/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ However, there are some [caveats](https://babeljs.io/docs/en/babel-plugin-transf
npm install --save-dev ts-jest
```

In order for Jest to transpile TypeScript with `ts-jest`, you may also need to create a [configuration](https://kulshekhar.github.io/ts-jest/docs/getting-started/installation#jest-config-file) file.

#### Type definitions

There are two ways to have [Jest global APIs](GlobalAPI.md) typed for test files written in TypeScript.
Expand Down