From 635bae346e2f2465f88e086347a4063255ac194b Mon Sep 17 00:00:00 2001 From: Jared M <73684895+professorjrod@users.noreply.github.com> Date: Sun, 9 Oct 2022 19:42:53 -0700 Subject: [PATCH] docs: link to ts-jest config Update GettingStarted.md docs: link to ts-jest config Mention needing addition configuration for ts-jest Co-Authored-By: Simen Bekkhus --- docs/GettingStarted.md | 2 ++ website/versioned_docs/version-25.x/GettingStarted.md | 2 ++ website/versioned_docs/version-26.x/GettingStarted.md | 2 ++ website/versioned_docs/version-27.x/GettingStarted.md | 2 ++ website/versioned_docs/version-28.x/GettingStarted.md | 2 ++ website/versioned_docs/version-29.0/GettingStarted.md | 2 ++ website/versioned_docs/version-29.1/GettingStarted.md | 2 ++ 7 files changed, 14 insertions(+) diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index a6b80910b30f..ad1eb3fcd9b8 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -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. diff --git a/website/versioned_docs/version-25.x/GettingStarted.md b/website/versioned_docs/version-25.x/GettingStarted.md index 83ec792cdfb6..0bd67dde3a07 100644 --- a/website/versioned_docs/version-25.x/GettingStarted.md +++ b/website/versioned_docs/version-25.x/GettingStarted.md @@ -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. diff --git a/website/versioned_docs/version-26.x/GettingStarted.md b/website/versioned_docs/version-26.x/GettingStarted.md index 5ae82e854ce5..9c5da17fd4c4 100644 --- a/website/versioned_docs/version-26.x/GettingStarted.md +++ b/website/versioned_docs/version-26.x/GettingStarted.md @@ -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. diff --git a/website/versioned_docs/version-27.x/GettingStarted.md b/website/versioned_docs/version-27.x/GettingStarted.md index d9d82caecae7..ec1069f16910 100644 --- a/website/versioned_docs/version-27.x/GettingStarted.md +++ b/website/versioned_docs/version-27.x/GettingStarted.md @@ -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. diff --git a/website/versioned_docs/version-28.x/GettingStarted.md b/website/versioned_docs/version-28.x/GettingStarted.md index 3440c221aabb..1a3367e497f3 100644 --- a/website/versioned_docs/version-28.x/GettingStarted.md +++ b/website/versioned_docs/version-28.x/GettingStarted.md @@ -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. diff --git a/website/versioned_docs/version-29.0/GettingStarted.md b/website/versioned_docs/version-29.0/GettingStarted.md index 6487633f3410..2dc65f8db822 100644 --- a/website/versioned_docs/version-29.0/GettingStarted.md +++ b/website/versioned_docs/version-29.0/GettingStarted.md @@ -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. diff --git a/website/versioned_docs/version-29.1/GettingStarted.md b/website/versioned_docs/version-29.1/GettingStarted.md index a6b80910b30f..ad1eb3fcd9b8 100644 --- a/website/versioned_docs/version-29.1/GettingStarted.md +++ b/website/versioned_docs/version-29.1/GettingStarted.md @@ -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.